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

[µo°Ý] ¦U¦ì¦Ñ®vvba §ïµ½Àò¨ú«ü©w­¶ªºµ{¦¡¤º¦³µ{§Ç¥N½X!

[µo°Ý] ¦U¦ì¦Ñ®vvba §ïµ½Àò¨ú«ü©w­¶ªºµ{¦¡¤º¦³µ{§Ç¥N½X!

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-2-19 15:00 ½s¿è
  1. Private Sub OptionButton1_Click() 'for default page
  2. Dim Arr(1 To 20) As String
  3. 'Dim thisworkbook As Workbook

  4. Arr(1) = "xxx1109"
  5. Arr(2) = "xxx1160"
  6. Arr(3) = "xxx1150"
  7. Arr(4) = "xxx1110"
  8. Arr(5) = "xxx1130"
  9. Arr(6) = "xxx1141"
  10. Arr(7) = "xxx1171"
  11. Arr(8) = "xxx1172"
  12. Arr(9) = "xxx1173"
  13. Arr(10) = "xxx1176"
  14. Arr(11) = "xxx1174"
  15. Arr(12) = "xxx1175"
  16. Arr(13) = "xxx1623"
  17. Arr(14) = "xxx1180"
  18. Arr(15) = "xxx1201"
  19. Arr(16) = "xxx1610"
  20. Arr(17) = "xxx1621"
  21. Arr(18) = "xxx1622"
  22. Arr(19) = "xxx1630"
  23. Arr(20) = "xxx1710"
  24. For A = 1 To 20
  25. UserForm1.ListBox2.AddItem (Arr(A))
  26. Next A

  27. End Sub
½Æ»s¥N½X
¦U¦ì¦Ñ®v,§Ú·Q¿ï¨ú«ü©wªºexcel­¶,¦@¦³20­¶

§Ú²{¦b¼gªº¤èªk¬O©w¤FÀɦW​​arr(1)xxx1109,

Á|¨Ò²Ä¤@­Ó¬Oxxx1109,·í­¶¦W¬Oxxx1109


´N·|¦bListBoxÅã¥Ü,¦ýxxx¬O·|Åܰʪº,¼Æ¦r´N¤£·|ÅÜ

xxx¤@Âà,¦p§ï¦¨­¶¦Wzzzz1109 §Ú´N¿ï¨ú¤£¨ì¤F

¦³¤èªk¥Î·j¬d¼Æ¦r,±q¦Ó¿ï¨úxxx1109/zzzz1109¶Ü?


§Úªº·N«ä´N¬O¹M¾ú©Ò¦³ªí®æ¦WºÙ
µM«á´£¨ú¨C­Óªí¦WºÙ³Ì«áªº¥|­Ó¦r²Å¶i¦æ¤Ç°t¡A¦A²K¥[¶i¦Cªí¡C
½Ð°Ý¦U¦ì¥i¥H¼gµ{§Ç¥N½X¥X¨Ó±Ð±Ð§Ú¶Ü??


¤W¶Ç¤Fªþ¥ó,¨D±Ð

UserForm1.rar (1.7 KB)

¦]µL¸ê®æ¤U¸üÀɮסA¥Î²qªº¡C
cw = "1109,1160,1150,1110,1130,1141,1171,1172,1173,1176,1174,1175,1623,1180,1201,1610,1621,1622,1630,1710"
For Each sh In Worksheets
    If InStr(cw, Right(sh.Name, 4)) <> 0 Then UserForm1.ListBox2.AddItem sh.Name
Next sh
[b]Kubi[/b]

TOP

¦^´_ 2# Kubi


  §Ú¥ý¸Õ¸Õ,·PÁ§Aªº¦^ÂÐ:'(

TOP

¦^´_ 2# Kubi


¤j¤j§Aªºµ{§Ç¥N½X,«ÜÀ°¨ì§Ú
¥t¥~½Ð°Ý¤j¤j§AÁÙ·|¦bUserForm1.ListBox2
Åã¥Ü¿ï¨ú¤F¦h¤Ö­ÓÀÉ®×?§Úªº·N«ä¬O¥Î§Aªºµ{§Ç,¦bUserForm1.ListBox2,§ä¨ì¦³3­ÓÀÉ®×
´N·|¥X²{"¤w¿ï¨ú3­ÓÀÉ®×"ªº¥y¤l¶Ü

TOP

¦hÁªO¥D´£¿ô,³o¬OexcelÀÉ

int.zip (15.32 KB)

TOP

¦^´_ 5# marco2000

µL¸ê®æ¤U¸üÀÉ®×...
¬Ý¬Ý©³¤U¬O§_¬Oª©¤j©Ò»Ý¡H
For i = 0 To ListBox2.ListCount - 1
    If ListBox2.Selected(i) = True Then n = n + 1
Next
MsgBox "¤w¸g¿ï¨ú " & n & " ­ÓÀÉ®×"
[b]Kubi[/b]

TOP

6# ¬O»¡©óListBox2¤º(¥iMultiSelect)¿ï¨ú´X­ÓÀɮסA­Y¬O­nª¾¹D§ä¨ì¤F´X­ÓÀɮסA¥H¤ÎListBox2¤º¿ï¨ú´X­ÓÀɮשó«h¬O¥Î¡G
For i = 0 To ListBox2.ListCount - 1
    If ListBox1.Selected(i) = True Then n = n + 1
Next
MsgBox "©ó" & ListBox2.ListCount & " ­Ó³Q§ä¨ìªºÀɮפ¤¡A¤w¿ï¤F¨ú " & n & " ­ÓÀÉ®×"
[b]Kubi[/b]

TOP

¸Õ¤F°Õ,¤j¤j§A«Ü±j,¬O§Ú·Q­nªº®ÄªG
§Ú·Q¦b¼u¥X¨ìMsgBox¥[YES/NO
YES´N¹B¦æ¥t¤@­ÓCommandButton3_Click  µ{¦¡,NO´N¤£ÅÜ

TOP

¦^´_ 7# Kubi


    ¯uªºµL¨¥·P¿E

TOP

¦^´_ 7# Kubi
  1.     Dim Msg, Style, Title, Help, Ctxt, Response, MyString
  2. Msg = "Do you want to continue ?"    ' ©w¸q°T®§¡C
  3. Style = vbYesNo + vbCritical + vbDefaultButton2    ' ©w¸q«ö¶s¡C
  4. Title = "MsgBox Demonstration"    ' ©w¸q¼ÐÃD¡C
  5. Help = "DEMO.HLP"    ' ©w¸q»¡©úÀÉ¡C
  6. Ctxt = 1000    ' ©w¸q¤º®e¥N½X¡C
  7.         ' Åã¥Ü°T®§¡C
  8. Response = MsgBox(Msg, Style, Title, Help, Ctxt)
  9. If Response = vbYes Then    ' ­Y¨Ï¥ÎªÌ«ö¤U [¬O]¡C
  10.     MyString = "Yes"    ' ²£¥Í¬Û¹ï¦^À³¡C
  11. Else    ' ­Y¨Ï¥ÎªÌ«ö¤U [§_]¡C
  12.     MyString = "No"    ' ²£¥Í¬Û¹ï¦^À³¡C
  13. End If
½Æ»s¥N½X
³o¬O§Úªºµ{§Ç¥N½X,¦p¦ó­×§ïmsgbox¬O§Aªºµ{§Ç,¨Ã¥[¤Wyes´N¹B¦æ,no´N¤£§@°Ê§@

TOP

        ÀR«ä¦Û¦b : °µ¸Ó°µªº¨Æ¬O´¼¼z¡A°µ¤£¸Ó°µªº¨Æ¬O·Mè¡C
ªð¦^¦Cªí ¤W¤@¥DÃD