ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð±ÐMultiPage¥Îªk

½Ð±ÐMultiPage¥Îªk

¥»©«³Ì«á¥Ñ fei6999 ©ó 2011-3-11 16:02 ½s¿è

MultiPage.rar (10.9 KB) ½Ð±Ð°ª¤â
µ{¦¡¦p¤U¦]MultiPage»yªk¤£À´
¦p¦ó¨ÏPage1,2,3°õ¦æ®É¤£¤¬¬Û¤zÂZ¦³¿ù½Ð«ü¥¿
°õ¦æ¨ìIf MultiPage2.Value = True Then®É·|¤¤Â_¥X²{¿ù»~°T®§!
MultiPage.JPG
2011-3-11 14:50

Private Sub CommandButton1_Click()
Dim gj As Variant
Dim kj As Long
ActiveSheet.Unprotect


If MultiPage1.Value = True Then
      MsgBox 1
        gj = TextBox1
        If gj > 35 Or gj < 1 Then Unload Me: MsgBox "Äæ¦ì¶W¥X½d³ò": Exit Sub
          If TextBox3 > 0 Then
          '¥¼§¹¦¨
         ' Cells(gj + 7, 2) = Range("d3")
         ' Cells(gj + 7, 4) = "=$d$3"
          End If

  End If

'*********´î¸ê*******************



If MultiPage2.Value = True Then
      MsgBox 2
      '¥¼§¹¦¨
            If TextBox2 >= 100 Then Unload Me: MsgBox "¤ñ¨Ò¤j©ó100": Exit Sub
            kj = Cells(gj + 7, 8)
            If kj = 0 Then Unload Me: MsgBox "²Ä" & gj & "µ§µL¸ê®Æ": Exit Sub
            If TextBox2 > 0 Then
              Cells(gj + 7, 8) = Int(kj * (1 - (TextBox2 / 100)))
              Cells(gj + 7, 10) = Round((Cells(gj + 7, 15) - Cells(gj + 7, 22)) / Cells(gj + 7, 8), 2)
            End If
End If

'**PAEG3***********
If MultiPage3.Value = True Then
     MsgBox 3
   If CheckBox1 = True Then
       For gj = 1 To 35
         If Cells(gj + 7, 15) = "" Then
   
               MsgBox gj
               If gi > 35 Then Exit Sub
         Else
           If OptionButton1 = True Then

               Cells(gj + 7, 15) = Cells(gj + 7, 15) + Cells(gj + 7, 11) + Cells(gj + 7, 21)
               Cells(gj + 7, 11) = ""
               Cells(gj + 7, 9) = "²{"
           End If
        
           If OptionButton2 = True Then
              h = Cells(gj + 7, 21)
              Cells(gj + 7, 11) = Cells(gj + 7, 11) - TextBox5
              c = Cells(gj + 7, 21)
              Cells(gj + 7, 15) = Cells(gj + 7, 15) + TextBox5 + h - c
           End If
         End If
       Next
         If gi > 35 Then Exit Sub
   End If 'CheckBox1
End If

'**********************************************


   Unload Me
   ActiveSheet.Protect

End Sub

¦^´_ 1# fei6999


    ¤p§Ì«Ü·Q¬Ý¬Ý¼Ó¥DªºªF¦è~ ¬O§_¥i¥H¤W¶ÇÀÉ®×???
    ¦]¬°¥\¤O©|²L~ »Ý­n¬Ý¨ì¹êÅé¤~¯à¤F¸Ñ°ÝÃD¦b­þ???
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2011-3-11 17:16 ½s¿è

¦^´_ 1# fei6999


    Q1µ{¦¡¦p¤U¦]MultiPage»yªk¤£À´,¦p¦ó¨ÏPage1,2,3°õ¦æ®É¤£¤¬¬Û¤zÂZ¦³¿ù½Ð«ü¥¿
      °õ¦æ¨ìIf MultiPage2.Value = True Then®É·|¤¤Â_¥X²{¿ù»~°T®§!
    A1 ¶È¥H¦¹°ÝÃD¦^µª­ò (¦]¬°¤£ª¾¹D§A¾ã­Óµ{¦¡¬O­n°µ¤°»ò¥Î)
        ¦b§Aªºªí³æ¤¤¶È¦³¤@­ÓMultiPage1ªºª«¥ó
      ·íµM¦b°õ¦æ¨ìIf MultiPage2.Value = True Then®É·|²£¥Í¿ù»~
      ¼Ó¥D§A­nªºÀ³¸Ó¬O¦b¤Á´«page®É«ö¤U½T©w®É°õ¦æ¸Ópageªº­pºâ
      ¦]¦¹,«Øij§ï¬°select caseªº¼gªk ´N¥i¥H¸Ñ¨M¤F
      ¨ä¥¦,µ¥¼Ó¥D¦³°ÝÃD®É,¦A´£°Ý
      ¦p¤U,µ{¦¡½X
Private Sub CommandButton1_Click()
Dim gj As Variant
Dim kj As Long
ActiveSheet.Unprotect

  Select Case MultiPage1.Value  <--MultiPage1.Value:«ü¦bMultiPage¤¤ªº­¶½X,°_©l­È¬°0
Case 0   '<--page1
' If MultiPage1.Value = True Then
      MsgBox 1
        gj = TextBox1
        If gj > 35 Or gj < 1 Then Unload Me: MsgBox "Äæ¦ì¶W¥X½d³ò": Exit Sub
          If TextBox3 > 0 Then
          '¥¼§¹¦¨
         ' Cells(gj + 7, 2) = Range("d3")
         ' Cells(gj + 7, 4) = "=$d$3"
          End If

'  End If

'*********´î¸ê*******************


Case 1'<--page2
' If MultiPage2.Value = True Then
      MsgBox 2
      '¥¼§¹¦¨
            If TextBox2 >= 100 Then Unload Me: MsgBox "¤ñ¨Ò¤j©ó100": Exit Sub
            kj = Cells(gj + 7, 8)
            If kj = 0 Then Unload Me: MsgBox "²Ä" & gj & "µ§µL¸ê®Æ": Exit Sub
            If TextBox2 > 0 Then
              Cells(gj + 7, 8) = Int(kj * (1 - (TextBox2 / 100)))
              Cells(gj + 7, 10) = Round((Cells(gj + 7, 15) - Cells(gj + 7, 22)) / Cells(gj + 7, 8), 2)
            End If
' End If

'**PAEG3***********
Case 2'<--page3

'If MultiPage3.Value = True Then
     MsgBox 3
   If CheckBox1 = True Then
       For gj = 1 To 35
         If Cells(gj + 7, 15) = "" Then
   
               MsgBox gj
               If gi > 35 Then Exit Sub
         Else
           If OptionButton1 = True Then

               Cells(gj + 7, 15) = Cells(gj + 7, 15) + Cells(gj + 7, 11) + Cells(gj + 7, 21)
               Cells(gj + 7, 11) = ""
               Cells(gj + 7, 9) = "²{"
           End If
        
           If OptionButton2 = True Then
              h = Cells(gj + 7, 21)
              Cells(gj + 7, 11) = Cells(gj + 7, 11) - TextBox5
              c = Cells(gj + 7, 21)
              Cells(gj + 7, 15) = Cells(gj + 7, 15) + TextBox5 + h - c
           End If
         End If
       Next
         If gi > 35 Then Exit Sub
   End If 'CheckBox1
'End If

      End Select

'**********************************************


   Unload Me
   ActiveSheet.Protect

End Sub
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 1# fei6999
VBAªº»¡©ú
MultiPage ¬O Pages ¶°¦Xªº¦¬¯Ç¾¹¡A¨ä¤¤¥]§t¤@©Î¦h­Ó Page ª«¥ó
MultiPage.Value¬O«ü¦b MultiPage¤¤¥Î¨Ó¥Nªí¥Ø«e§@¥Î¤¤­¶ÅÒªº¾ã¼Æ¡C   ¹s (0) ªí¥Ü²Ä¤@­¶¡A³Ì¤j­È¤p©óÁ`­¶¼Æ 1¡C
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
­×§ï§Aªºµ{¦¡¦p¤U ´N¥i¥H
If MultiPage1.Value = 0 Then
      MsgBox 1

If MultiPage1.Value = 1 Then
      MsgBox 2'

If MultiPage1.Value = 2 Then
      MsgBox 3

TOP

·PÁÂ!°ÝÃD¸Ñ¨M¤F
¤p§Ì·s¤â¤@­Ó§Æ±æ¦³¾÷·|¦h¦h¾Ç²ß

TOP

        ÀR«ä¦Û¦b : §ïÅܦۤv¬O¦Û±Ï¡A¼vÅT§O¤H¬O±Ï¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD