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

[µo°Ý] ¦p¦ó±Nªí³æ¤ºªºmultipage¼W³]ª«¥óÃþ§O©O¡H

[µo°Ý] ¦p¦ó±Nªí³æ¤ºªºmultipage¼W³]ª«¥óÃþ§O©O¡H

¦U¦ì¤j¤j¦n¡G

  ¤p§Ì¦bªí³æ¤ºªº¼W³]MULTIPAGE
¦³PAGE1¤ÎPAGE2¨Ã¦bUSERFORM_INITIALIZE
¼W³]¦¹ª«¥óÃþ§O®É¡A¥X²{¿ù»~¤º®e¦p¤U

°õ¦æ¶¥¬q¿ù»~-2147024809(80070057)
§ä¤£¨ì«ü©wª«¥ó¡A½Ð°ÝÀ³¦p¦ó­×¥¿
USERFORM1_INITIALIZE¤ºªº»yªk©O¡H

»yªk¦p¤U¡G

ª«¥óÃþ§O

Option Explicit

Public WithEvents mTxt As MSForms.TextBox
Public WithEvents mCmd As MSForms.CommandButton
Public WithEvents mPage As MSForms.MultiPage

Private Sub mCmd_Click()
   
    MsgBox mCmd.Name
   
End Sub

ªí³æ

Option Explicit
Dim mTb() As New myClass
Dim mCd() As New myClass
Dim mPg() As New myClass
Dim co1 As New Collection
Dim co2 As New Collection

Private Sub UserForm_Initialize()   
    Dim i As Long
    Dim j As Long
    Dim k As Long
   
    ReDim mTb(1 To 2)
    For i = 1 To 2
        Set mTb(i) = New myClass
        Set mTb(i).mTxt = Me.Controls("Textbox" & i)
        co1.Add mTb(i).mTxt
    Next
   
    ReDim mCd(1 To 6)
    For j = 1 To 6
        Set mCd(j) = New myClass
        Set mCd(j).mCmd = Me.Controls("CommandButton" & j)
        co2.Add mCd(j).mCmd
    Next
   
    ReDim mPg(0 To 1)
    For k = 0 To 1
        Set mPg(1) = New myClass   '»yªk¿ù»~
        Set mPg(1).mPage = Me.Controls("MultiPage" & k)
    Next            
End Sub

ÁÂÁ¦U¦ì¤j¤j¡I

mPage2.rar (11.56 KB)

¦^´_ 1# dechiuan999
1.  Set mPg(k) = New myClass¡A§A§âk¼g¦¨1¤F
2.  UserForm¤W¥u¦³¤@­ÓMultiPageª«¥ó¡A§YMultiPage1¡A
      "PDFÀÉ"©M"AZLBÀÉ"³o¨â­Ó¤À­¶¬O MultiPage1 ©³¤Uªº Page ª«¥ó¡A
      ¨Ò¦p¤À­¶"PDFÀÉ"¥i¥Î : MultiPage1.Page1 ©Î MultiPage1.Page(0) ªí¥Ü

TOP

¦^´_ 2# stillfish00


    ¤j¤j±z¦n¡G

¤p§Ì¸ÕµÛ±N»yªk§ï¦¨¦p¤U
¤]¬O¤£¦æ©O¡H

ReDim mPg(1 To 2)
   
Set mPg(1) = New myClass
Set mPg(1).mPage = UserForm1.MultiPage1.Pages(0)
        
Set mPg(2) = New myClass
Set mPg(2).mPage = UserForm1.MultiPage1.Pages(1)

¥t¤p§Ì·Q¦bª«¥óÃþ§O¼W¦C
Private Sub mPage_Change()
       
End Sub
¤º®e¬°·í¨Ï¥ÎªÌ¿ï¨ú
page®É¯à±oª¾¬O
page1ªº¦WºÙpdfÀÉ
©Î¬O
page2ªº¦WºÙazlbÀÉ
¬O§_¥i½Ð¤j¤j¯à´£¨Ñ­×¥¿ªº
»yªkÅý¤p§Ì¾Ç²ßmultipage
¦bª«¥óÃþ§O¦p¦ó¹B§@


ÁÂÁ±z¡I

TOP

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2013-10-25 15:44 ½s¿è

¦^´_ 3# dechiuan999
§A­nª¾¹D¨Ï¥ÎªÌ¿ï¨ú®É¬O­þ¤@­Ó¤À­¶¡A¥i¥H¦bchange§PÂ_
Private Sub MultiPage1_Change()
  msgbox MultiPage1.Pages(MultiPage1.Value).Caption
End Sub

TOP

¥»©«³Ì«á¥Ñ dechiuan999 ©ó 2013-10-25 17:38 ½s¿è

¦^´_ 4# stillfish00


    ÁÂÁ¤j¤jªº»¡©ú
¤p§Ì¬O¤F¸Ñ¦b¤@¬q¼Ò²Õ¤º
¦p¦ó¾Þ§@multipage
¡C¦ý¤p§Ì¬O·Q¸ÕµÛ¦bÃþ§O¼Ò²Õ
¤º¨Ó¾Þ§@multipage
¡C¦]¦¹¡A¤p§Ì¤]¦bÃþ§O¼Ò²Õ
¸Ì«Å§i
Public WithEvents mPage As MSForms.MultiPage
¦ý¤£ª¾¦p¦ó¨Ó¾Þ§@mpage¦¹ª«¥ó¹ï¶H¡C

ÁÂÁ¤j¤j¡I

TOP

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2013-10-25 20:04 ½s¿è

¦^´_ 5# dechiuan999
§Úª¾¹D§A­nªº¬O
myClass
  1. Option Explicit

  2. Public WithEvents mTxt As MSForms.TextBox
  3. Public WithEvents mCmd As MSForms.CommandButton
  4. Public WithEvents mPage As MSForms.MultiPage

  5. Private Sub mPage_Change()
  6.   MsgBox mPage.Pages(mPage.Value).Caption
  7. End Sub
½Æ»s¥N½X
Userform
  1. Private Sub UserForm_Initialize()
  2.    
  3.     Dim i As Long
  4.     Dim j As Long
  5.     Dim k As Long
  6.    
  7.     ReDim mTb(1 To 2)
  8.     For i = 1 To 2
  9.         Set mTb(i) = New myClass
  10.         Set mTb(i).mTxt = Me.Controls("Textbox" & i)
  11.         co1.Add mTb(i).mTxt
  12.     Next
  13.    
  14.     ReDim mCd(1 To 6)
  15.     For j = 1 To 6
  16.         Set mCd(j) = New myClass
  17.         Set mCd(j).mCmd = Me.Controls("CommandButton" & j)
  18.         co2.Add mCd(j).mCmd
  19.     Next
  20.    
  21.     ReDim mPg(1 To 1)
  22.     For k = 1 To 1
  23.         Set mPg(k) = New myClass
  24.         Set mPg(k).mPage = Me.Controls("MultiPage" & k)
  25.     Next
  26. End Sub
½Æ»s¥N½X
¦ý¬OÀ³¸Ó¬O Userform ¤W¦³«Ü¦h­Ó MultiPage ®É³o¼Ë¼g¤~¦³¥Î§a¡C

TOP

¦^´_ 5# dechiuan999

  1. ªí³æ¤wDim mPg() As New myClass
  2. ¤£»Ý¦A Set mPg(1) = New myClass
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2013-10-27 12:37 ½s¿è

¦^´_ 7# GBKEE
«Å§i³oÃä¬O¦h¤F¡A¦ý§Úı±o¥ý
Dim mPg() As myClass
«á­±¦A
Set mPg(1) = New myClass
Å㦡¦a³Ð«Ø¹êÅé·|¤ñ¸û¦n¡A¤]¥i¥H©ú½Tª¾¹DClass_Initialize()³QIJµo¦ì¸m

TOP

¦^´_ 8# stillfish00
  1. ¼Ó¥DªºªþÀɪí³æ³»ºÝ¤wDim mPg() As New myClass
  2. ¥i¤£»Ý¦A­«½Æ Set mPg(1) = New myClass
½Æ»s¥N½X
  1. ¦pªGªþÀɪí³æ³»ºÝ¥u¬ODim mPg() As myClass
  2. ·íµM¬O»Ý¦A Set mPg(1) = New myClass
  3. ¨ºªþÀɪí³æ³»ºÝ¥u¶·¬ODim mPg()
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ dechiuan999 ©ó 2013-10-29 08:43 ½s¿è

¦^´_ 6# stillfish00
ÁÂÁ¤G¦ì¤j¤jªº

TOP

        ÀR«ä¦Û¦b : ¥ÌÄ@°µ¡BÅw³ß¨ü¡C
ªð¦^¦Cªí ¤W¤@¥DÃD