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

[µo°Ý] Excel VBA ¦Û­qªí³æ¦h­«­¶­±°ÝÃD

¦^´_ 1# lichang
¤£ª¾§AIJµoªí³æªº¤è¦¡
¤U­±ªº UserForm (ªí³æ) ¨Æ¥óµ{¦¡³£¥i¥H°õ¦æ§Aªº¥¨¶°
  1. Private Sub UserForm_Activate()
  2. 'ªí³æÅܦ¨²{¥Îªí³æµøµ¡ªº®É­Ô¡A·|µo¥Í Activate ¨Æ¥ó¡C
  3. End Sub
  4. Private Sub UserForm_Click()
  5. '·Æ¹«¥ªÁä«ö¤@¤Uªí³æ,«h·|µo¥Í Click ¨Æ¥ó¡C
  6. End Sub
  7. Private Sub UserForm_Initialize()
  8. 'Initialize ¨Æ¥ó µo¥Í¦b¤@­Óª«¥ó¸ü¤J«á , ¦ý©|¥¼Åã¥Üªº®É­Ô
  9. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# lichang
¦ý¥Ø«e°ÝÃD¦b©óµe­±¤Ï¦Ó¤£·|§Y®É§ó·s¡A½Ð°Ý¸Ó¦p¦ó³B²z??
¥i§_ªþÀÉ»¡©ú
§A¤F¸Ñ¤@¤U³o .Value   .Visible ªºÄÝ©Ê
  1. Private Sub MultiPage1_Change()
  2. MsgBox MultiPage1.Value
  3.    If MultiPage1.Value = 1 Then
  4.       Image_ZOrder
  5.    Else
  6.       MultiPage1.Visible = False
  7.    End If
  8. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# lichang
  1. Private Sub MultiPage1_Change()
  2.     If MultiPage1.Value = 1 Then
  3.         Image_ZOrder '±Nµ{¦¡±±¨îÅvÂಾ ³o [Image_ZOrder]µ{§Ç¡A
  4.         '¶·µ¥³oµ{¦¡°õ¦æ§¹²¦,µ{¦¡±±¨îÅv¤~·|¦^¨ì³o¸Ì
  5.         'Ä~Äò End If ¤U­±ªºµ{¦¡½X
  6.         'Image_ZOrder °õ¦æ´Á¶¡, MultiPage1_Changeªºµ{¦¡¤£·|°õ¦æªº
  7.         '©Ò¥H²§°Ê¨â¦¸«á¤~·|¦^´_
  8.     Else
  9.         '''µ{¦¡½X
  10.     End If
  11.     '''End If«áªºµ{¦¡½X
  12.     '''End If«áªºµ{¦¡½X
  13. End Sub
½Æ»s¥N½X
¸Õ¸Õ¬Ý
  1. Dim Msg As Boolean, Form_Msg As Boolean
  2. Private Sub MultiPage1_Change()
  3.     If MultiPage1.Value = 1 Then
  4.         Msg = True
  5.     Else
  6.         Msg = False
  7.     End If
  8. End Sub
  9. Private Sub UserForm_Activate()
  10.     Do While Form_Msg = False
  11.         DoEvents
  12.         If Msg = True And MultiPage1.Value = 1 Then
  13.             Image_ZOrder
  14.         End If
  15.     Loop
  16. End Sub
  17. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
  18.     Form_Msg = True
  19. End Sub
  20. Private Sub Image_ZOrder()
  21.     Dim Ar(), i As Integer, j As Integer, t As Date
  22.     Ar = Array(Image1, Image2, Image3)
  23.     t = Time
  24.     Do While Msg = True And MultiPage1.Value = 1 '°õ¦æ³o Do Loop ªº°j°é
  25.         DoEvents
  26.         'Sleep 1000
  27.         If t + #12:00:01 AM# <= Time Then  '¨C¬í¤@¦¸,¤]¥i¥H¤£¥Î Sleep
  28.             Ar(i).ZOrder msoBringToFront
  29.             i = i + 1
  30.             If i > UBound(Ar) Then i = 0
  31.             t = Time
  32.         End If
  33.     Loop
  34. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD