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

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

http://www.FunP.Net/246277
§Ú¶Ç¤F§ÚªºÀɤW¥h
®t¤@ÂIÂI,§Ú§Æ±æªº¬O«ö¤FCommandButton3_Click
·|¼u¥Xmsgbox´£¥Ü§Ú¿ï¤F¦h¤Ö­ÓÀÉ,¨Ã¿ïyes ¹B¦æCommandButton3_Clickªºµ{¦¡
¿ïNO¨S¤ÏÀ³,¦^¨ìUserForm1

TOP

¦^´_ 10# marco2000


½Ð¤U¸ü¼±ÀÀÀɮסA¸Õ°õ¦æ¬Ý¬Ý¬O§_¬Oª©¤j©Ò­nªº¡C
http://www.FunP.Net/115998
[b]Kubi[/b]

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

¦^´_ 7# Kubi


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

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

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

¦^´_ 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

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

int.zip (15.32 KB)

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

¦^´_ 2# Kubi


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

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD