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

[µo°Ý] ¸óUserForm°õ¦æCommandButton

[µo°Ý] ¸óUserForm°õ¦æCommandButton

½Ð°Ý §Ú·Q­n¦bUserForm2¤ºªºCommandButton_Click
°õ¦æUserForm1¤ºªºCommandButton1_Click
¦³¨S¦³¸û²³æªº«ü¥O¼gªk?

©ÎªÌ¥u¯à­«·s¦bUserForm2­«³]¬Û¦P«ü¥O?
boyao

¦^´_ 1# boyao
¦³¨S¦³¸û²³æªº«ü¥O¼gªk?©ÎªÌ¥u¯à­«·s¦bUserForm2­«³]¬Û¦P«ü¥O?
­n¦³½d¨Ò¤º®e,¤~ª¾¦³¸ÑµL¸Ñ.

TOP

¦^´_ 2# GBKEE


G¤j
§Úª¾¹Dªº¤è¦¡¬O¥i¥H¼g¦b¼Ò²Õ
¥Î¼Ò²Õªº¦WºÙ¥h°õ¦æ«ü¥O

¦ý¦bUserForm¤¤.¦³¨S¦³¬Û¦Pªº¥Îªk?¥i¥H¹F¦¨¬Û¦Pªºµ²ªG
¦Ó¤£¶·§â«ü¥O­«·s©ñ¸m©ó¼Ò²Õ¤¤

·PÁÂ

·s¼W Microsoft Excel ¤u§@ªí.rar (12.83 KB)
boyao

TOP

¦^´_ 3# boyao
¨Ï¥Îª«¥óÃþ§O¼Ò²Õ ¸Õ¸Õ¬Ý
¦bVBA¤¤´¡¤Jª«¥óÃþ§O¼Ò²Õ, ¹w³]¦WºÙ¬° Class1.
UserFormªºµ{¦¡½X
  1. Dim User_«ö¶s As New Class1    'UserForm «Å§i ÅܼƬ°·sªºª«¥óÃþ§O¼Ò²Õ
  2. Private Sub UserForm_Initialize()
  3.     Set User_«ö¶s.ª«¥ó_CommandButton = CommandButton1
  4.     '·sªºª«¥óÃþ§O¼Ò²Õ ÅܼÆ( ª«¥ó_CommandButton )= ³]©w ¬° CommandButton1
  5. End Sub
½Æ»s¥N½X
ª«¥óÃþ§O¼Ò²Õªºµ{¦¡½X
  1. Option Explicit
  2. Public WithEvents ª«¥ó_CommandButton As MSForms.CommandButton
  3. Private Sub ª«¥ó_CommandButton_Click()
  4.     Dim i As Integer
  5.     For i = 1 To 100
  6.         Sheet1.Range("A" & i) = (i * 50)
  7.     Next i '
  8. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE


ÁÂÁÂG¤j
ª«¥óÃþ§O¼Ò²Õ...§ÚÁÙ¨S¥Î¹L(¤£·|¥Î)
§ÚÁÙ¬O§â¥¦½Æ»s¨ì¼Ò²Õ¤W¥h³]¦n¤F
boyao

TOP

        ÀR«ä¦Û¦b : µÊ®ð¼L¤Ú¤£¦n¡A¤ß¦a¦A¦n¤]¤£¯àºâ¬O¦n¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD