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

[µo°Ý] MultiPage¼gªk

[µo°Ý] MultiPage¼gªk

¥»©«³Ì«á¥Ñ acdx ©ó 2014-8-20 15:06 ½s¿è

PTAVS.zip (92.9 KB)
ªí³æ¤¤¦³¼Æ­ÓMultiPage,¸Ó¦p¦ó¨Ï¥L¸õ¦Ü«ü©wªº­¶­±?
½d¨Ò:
¿ï1U-C2®É¦Û°Ê¸õ¨ì1U©³¤UC2
[attach]18973[/attach]
¿ï1U-C4®É¦Û°Ê¸õ¨ì1U©³¤UC4

¿ï3U-C4®É«o¤£·|¸õ¨ì3U©³¤UC4

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-8-21 05:58 ½s¿è

¦^´_ 1# acdx
¸Õ¸Õ¬Ý
  1. Private Sub CommandButton4_Click()
  2.     Dim i As Integer
  3.     With Frame5
  4.         For i = 0 To .Count - 1
  5.              .Controls(i).Value = False
  6.         Next
  7.     End With
  8.     OptionButton11_Click
  9. End Sub
½Æ»s¥N½X
  1. Private Sub OptionButton25_Click()
  2.     Dim i As Integer, ii As Integer   
  3.     i = -1
  4.     With Frame93
  5.         For ii = 0 To .Count - 1
  6.             If .Controls(ii).Value Then i = ii: Exit For
  7.         Next
  8.     End With
  9.     With MultiPage2
  10.         For ii = 0 To .Pages.Count - 1
  11.             .Pages(ii).Enabled = (i = ii)
  12.         Next
  13.         .Value = i
  14.     End With
  15.     OptionButton11_Click
  16. End SubEnd Sub
  17. Private Sub OptionButton26_Click()
  18.     OptionButton25_Click
  19. End Sub
  20. Private Sub OptionButton27_Click()
  21.     OptionButton25_Click
  22. End Sub
  23. Private Sub OptionButton28_Click()
  24.     OptionButton25_Click
  25. End Sub
½Æ»s¥N½X
  1. Private Sub OptionButton11_Click()
  2.     Dim p As Control, i As Integer, ii As Integer
  3.     With MultiPage2
  4.         Set p = .Pages(.Value).Controls(0)
  5.     End With
  6.     i = -1
  7.     With Frame5
  8.         For ii = 0 To .Controls.Count - 1
  9.             If .Controls(ii).Value Then i = ii: Exit For
  10.         Next
  11.     End With
  12.     With p
  13.         For ii = 0 To .Pages.Count - 1
  14.             .Pages(ii).Enabled = (i = ii)
  15.         Next
  16.         If .Pages.Count - 1 >= i Then .Value = i
  17.     End With
  18. End Sub
  19. Private Sub OptionButton12_Click()
  20.     OptionButton11_Click
  21. End Sub
  22. Private Sub OptionButton13_Click()
  23.     OptionButton11_Click
  24. End Sub
  25. Private Sub OptionButton14_Click()
  26.     OptionButton11_Click
  27. End Sub
  28. Private Sub OptionButton15_Click()
  29.     OptionButton11_Click
  30. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE
·PÁÂG¤jªºÀ°¦£
¦b¤U¹ïµ{¦¡ÁÙ¦³¨Ç¤£À´
Private Sub OptionButton11_Click()
    Dim p As Control, i As Integer, ii As Integer
    With MultiPage2
        Set p = .Pages(.Value).Controls(0)
    End With
     i = -1
     With Frame5
         For ii = 0 To .Controls.Count - 1
             If .Controls(ii).Value Then i = ii: Exit For
         Next
     End With
     With p
         For ii = 0 To .Pages.Count - 1
             .Pages(ii).Enabled = (i = ii)
         Next
         If .Pages.Count - 1 >= i Then .Value = i        '¦¹¦æªº¥Î³~¬°¦ó?
     End With
End Sub

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-8-21 20:44 ½s¿è

¦^´_ 3# acdx
  1. Private Sub OptionButton11_Click()
  2.     Dim p As Control, i As Integer, ii As Integer
  3.     With MultiPage2
  4.         Set p = .Pages(.Value).Controls(0)  'MultiPageª«¥ó*************
  5.         '**************************************************************
  6.         '¦p MultiPage2.Value=3
  7.         'MultiPage2ªºPage(3)["Others"]¤¤MultiPage3¥u¦³¤@­ÓPage(User-Defined)
  8.         '**************************************************************
  9.     End With     
  10.     i = -1
  11.      With Frame5 '¦³5­ÓOptionButton  **************
  12.          For ii = 0 To .Controls.Count - 1
  13.              If .Controls(ii).Value Then i = ii: Exit For
  14.                 '***************************************
  15.                 'Frame5 ²Ä5­ÓOptionButton.Value=True i = 4
  16.                 '¨S¦³.Value=True ®É  i = -1            
  17.                 '***************************************               
  18.          Next
  19.      End With
  20.      With p     'MultiPageª«¥ó**************************
  21.          For ii = 0 To .Pages.Count - 1
  22.              .Pages(ii).Enabled = (i = ii)
  23.          Next
  24.          If .Pages.Count - 1 >= i Then .Value = i        '¦¹¦æªº¥Î³~¬°¦ó?       
  25.         '***************************************************
  26.         '¦p MultiPage2.Value=3 ¥B i = 4 ©Î i = -1        
  27.         '¨S¦³If .Pages.Count - 1 >= i ªº­­¨î,.Value = i ·|¦³¿ù»~²£¥Í.
  28.         '***************************************************
  29.      End With
  30. End Sub
½Æ»s¥N½X
¨Ï¥ÎClass ª«¥óÃþ§O¼Ò²Õ,ªí³æ¤¤OptionButton±±¨î¶µªº¦WºÙ¦³­×§ï.
Ex.rar (26.64 KB)
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¤£¤@©w²y²y¬O¦n²y¡A¦ý¬O¦³¾ú½mªº±j¥´ªÌ¡AÀH®É³£¥i¥H´§´Î¡C
ªð¦^¦Cªí ¤W¤@¥DÃD