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

[µo°Ý] ½Ð°Ý¤@­Ó­«Âе{¦¡½X¨Ï¥Î¤Wªº°ÝÃD

[µo°Ý] ½Ð°Ý¤@­Ó­«Âе{¦¡½X¨Ï¥Î¤Wªº°ÝÃD

¤£ª¾¹D¸Ó«ç»ò¤U¼ÐÃD{:3_60:} ¡Asorry

ª¬ªp¬O³o¼Ë

§Ú³]­p¤F¤@­Óªí³æ¡A¤W­±¦³10­Ótextbox±±¨î¶µ
¥t¥~ÁÙ¦³¤@­Ólabel¡A°µ¬°²Î­p³o10­ÓtextboxªºÁ`©M
µM«á§Ú·Q·í¥ô¤@­Ótextboxªº­È§ïÅÜ®É
labelªº¤º®e³£¯à§Y®É§ó·s
¥Ø«eª¾¹D¥i¥H¥Îtextbox_change³B²z
°ÝÃD¬O
Ãø¹D10­Ó textboxªºchange¨Æ¥ó³£­n¼g¤W¬Û¦Pªºµ{¦¡½X¶Ü¡H

³Â·Ð¤F¡AÁÂÁÂ~~~

¦^´_ 1# mygod0403



ªí³æUserForm1µ{¦¡½X
  1. Dim col As New Collection
  2. Private Sub UserForm_initialize()
  3. Dim myc As cmds
  4. For i = 1 To 10
  5.   Set myc = New cmds
  6.   Set myc.cmd = Me.Controls("Textbox" & i)
  7.   col.Add myc
  8. Next
  9. Set myc = Nothing
  10. End Sub
½Æ»s¥N½X
ª«¥óÃþ§O¼Ò²Õcmdsµ{¦¡½X
  1. Public WithEvents cmd As MSForms.TextBox
  2. Private Sub cmd_change()
  3. For i = 1 To 10
  4.   data = data + Val(UserForm1.Controls("Textbox" & i))
  5.   UserForm1.Label1.Caption = data
  6. Next
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# register313


  ½Ð°Ý ¹³±z©Ò¼gªºµ{¦¡½X ¤]¬O¥i¥H¹B¥Î¦b¤u§@ªí¤Wªº³]¸m¦nªºTextbox ¶Ü¡H

TOP

¤j¦P¤p²§¡A¦ý¤£¯à§¹¥þ®M¥Î¡C

TOP

¤j¦P¤p²§¡A¦ý¤£¯à§¹¥þ®M¥Î¡C
oobird µoªí©ó 2012-5-12 10:15



   ¨º­n«ç§ï©O? ¯à¤£¯à±Ð¤@¤U §Ú¤]¦³¬Û¦Pªº°ÝÃD ¥u¬O¦b¤u§@ªí¤W¦Ó¤w(®t¦b§Úªº¬O¥ÎSpinButton)   ÁÂÁ§A¤F

TOP

¤£¦n·N«ä¡A¨S¦³¤å¥ó¸Ó«ç»òÀ°§A§ï¡H

TOP

¥»©«³Ì«á¥Ñ icestormer ©ó 2012-5-12 13:32 ½s¿è

¦^´_ 6# oobird

SpinButton½m²ß.rar (12.01 KB)
¹ï¤£°_ ²{¦bªþ¤WÀÉ®×
Àɮפ¤ ¦³5­Óspinebutton
§@¥Î:¥Ñ1¨ì5 ¤À§O ¹ïA5¨ìE5 ³£¬O¬Û¦P§@¥Î¥u¬OÄæ§O¤£¦P,¨ä¥¦µ{¦¡½X§¹¥þ¤@¼Ë

¥t¥~ ¦³¤@­Ó©_©Çªº°ÝÃD. ¦p¤U¹Ï(4­Ó¹Ï)
²Ä¤@¤Î²Ä¤G±i¹Ï ³£¦³«ü©w¥¨¶° ¤Î±±¨î


===============================================================
¦ý²Ä¤T¤Î²Ä¥|±i¹ÏÓý¨S¦³.. ¤£ºÞ«ç§Ë³£§ä¤£¨ì
²Ä¤T¤Î²Ä¥|±i´N¬O¦bÌrÀɤWªºspinebutton  ,½Ð°Ý­n«ç§â«ü©w¥¨¶°¤Î±±¨î§Ë¥X¨Ó?(§Ú¬O¥Îexcel2003)


================================================================
¥Ñ©ó¬Ý¤£À´ ¤U¤è³oºØ»yªk,¦pªG·Q­n§ËÀ´,½Ð°Ý¬O­n¥h¨º¸Ì¾Ç²ß©Î¬O¦³¤°»ò¦nªº¾Ç²ß®Ñ¥i¥H¶R©O?µo²{®Ñ©±¤¤¦³ÃöVBAªº®Ñ«Ü¤Ö(¥Ø«e¶Rªº4¥» ¤]³£¨S¦³¤¶²Ð¨ì³o³¡¥÷)
1:excel vba ¥\¯à¯Á¤Þ¦¡°Ñ¦Ò¤â¥U
2:excel ¶W¹Ï¸Ñ VBA °ò¦Á¿®y
3:  .............................. ¹Ð¥ÎÁ¿®y
4:¿ì¤½«Ç´£ª@®Ä²v¥²³ÆEXCEL VBA §Þªk256©Û
---------------------------------------------------------------------------------------------------------------------------------------------------
Public WithEvents txb As MSForms.TextBox
Dim txbs(11 To 49) As txb
Dim col As New Collection

TOP

¥»©«³Ì«á¥Ñ oobird ©ó 2012-5-12 16:49 ½s¿è

spinebutton »P·L½Õ«ö¶s¬O¤£¤@¼ËªºªF¦è¡C
¹Ï¤@¹Ï¤G¬Oªí³æ¤u¨ãªº·L½Õ«ö¶s¡A©Ò¥H¦³³o­Ó¿ï¶µ
¤U­±ªº¬O±±¨î¤u¨ãªºspinebutton ¡A¤£¯à²V¬°¤@½Í
¥H¤U¬O¥Îªí³æ¤u¨ã°µªº¨Ò¤l SpinButton½m²ß2.rar (9.16 KB)

TOP

¥»©«³Ì«á¥Ñ icestormer ©ó 2012-5-12 22:26 ½s¿è

¦^´_ 8# oobird


¦³´X­Ó°ÝÃD¦pªGoobird ©Î¦³°ª¤â·|  ³Â·Ð±Ð¤@¤U, ·PÁÂ
³o­ÓÀɬO §Ú§âoobird ¤j´£¨Ñªº,¤@Ãä²z¸Ñ»yªk¤@Ãä§ïªº,¦ý¤]²£¥Í¤F´X­Ó°ÝÃD
¥ýªþ¤WÀÉ®× ·L½Õ«ö¶s½m²ß.rar (9.48 KB)
²Ä¤@­Ó°ÝÃD:
Private Sub Workbook_Open()
   Dim ctl As Shape
   For Each ctl In Sheet1.Shapes
       If ctl.Type = 8Then  
          ctl.OnAction = "Btn_Click" <<¦¹¦æ¸ò¨Ï¥Î  call Btn_click ¦³¤°»ò§Ú¬Ý¤£¥X¨Óªº®t§O¶Ü?(°õ¦æ°_¨Ó³£¬O¤@¼Ë©O)
         End If
   Next ctl
End Sub
²Ä¤G­Ó°ÝÃD:
Sub Btn_Click()

    «ö¶s¦W = Application.Caller
    n = Val(Right(Application.Caller, 1))<<application.caller ¹ê»Ú§@¥ÎÁÙ¬O¤£À´ ¤£ª¾¯à¤£¯à±Ð¤@¤U
    ªø«× = Len(Application.Caller)
   
With Cells(4, n)
   
  If Left(«ö¶s¦W, 1) = "·L" Then
        
         If Cells(1, n).Value = 1 Then <<¦¹¦æ ­ì¥»¬O·Q±Ä¥Îª½±µ¨ú [·L½Õ«ö¶s]ªº­È ¦ý³£¥¢±Ñ(§Ú¥u·|¨Ï¥Î spinebutton.value ¦ý¤S¨Sªk¥Î.) ¥u¦n§â¥¦ªº­È³sµ²¦b ¤u§@ªí¤WªºÀx¦s®æ¤W
   
               .Value = "§A«ö¤F:" & «ö¶s¦W & "³Ì¤j­È"
               .Characters(5, ªø«×).Font.ColorIndex = 3
               .Characters(6 + ªø«×, 1).Font.ColorIndex = 3
         Else
                .Value = "§A«ö¤F:" & «ö¶s¦W & "³Ì¤p­È"
                .Characters(5, ªø«×).Font.ColorIndex = 3
                .Characters(6 + ªø«×, 1).Font.ColorIndex = 8
         End If
              
   Else
   
          .Value = "§A«ö¤F" & «ö¶s¦W
         
          .Characters(3 + ªø«×, 1).Font.ColorIndex = 3
     
   End If

TOP

¦^´_ 2# register313
¤£¦n·N«ä¡K
°õ¦æ¨ì col.add myc ¦C
¥X²{¡u§ä¤£¨ì«ü©wªºª«¥ó¡v¿ù»~°T®§
ÁÂÁÂ~~~

TOP

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