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

[µo°Ý] ¦p¦ó§Q¥Î°j°éª½±µ§ïLabel ªºname?(¤w¸Ñ¨M)

[µo°Ý] ¦p¦ó§Q¥Î°j°éª½±µ§ïLabel ªºname?(¤w¸Ñ¨M)

¥»©«³Ì«á¥Ñ icestormer ©ó 2012-5-7 08:41 ½s¿è

§Ú¦³¤j¬ù53­Ólabel16 -label53 §Ú·Q§Q¥Î°j°é ª½±µ§âname §ï¦¨ label16>>LB1 ¤@©y¨ìLB53


¦ý§Úµo²{§ï¤£©O, §ï¥¦ªºcaption ­Ë¥i¥H ¤£ª¾­n«ç¼g©O?
Sub §ï¦W()

  For i = 1 To 53
   
         §Úªºªí³æ.Controls("Label" & i + 15).Name

  Next
  
  End Sub

¤p§Ì¥\¤O©|²L¡K
¬Ý¨S¦³«ÜÀ´§A·Q­nªí¹F¤°»ò¡A¦³¨S¦³ªþ¥ó©O¡H
¦³¥I¥óÀ°±z°µ¤ñ¸û§Ö¡K¡K
ªì¾ÇVBA¥E¨ìtwbts

TOP

¦^´_ 1# icestormer
¥²¶·¬O¥Ñµ{¦¡°ÊºA·s¼Wª«¥ó¤~¯à°÷¦bªí³æªì©l¤Æ®É°µ·s¼W¦P®É©R¦W
¤w¸g¨Ï¥Î¤â°Ê¥¬¸mªºª«¥ó¡A¦bªí³æ±Ò°Ê«á«hµLªk­«·s©R¦W
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# Hsieh


   ¨º§Ú¤F¸Ñ ·PÁ ¶Wª©

TOP

¥»©«³Ì«á¥Ñ icestormer ©ó 2012-5-4 11:36 ½s¿è

¥i¥H½Ð±Ð¤@¤U  ¦p¦ó¼g°ÊºA«Ø¥ßLabel ¦bªí³æ¤W©O ,?¥i¥H¦P®É³]©w ¦hªø ¦h°ª ¤Î¦ì¸m¶Ü?

TOP

¦^´_ 5# icestormer
  1. Private Sub UserForm_Initialize()
  2. '·s¼W2Äæ8¦C
  3. For j = 1 To 2
  4.     For i = 1 To 8
  5.       With Controls.Add("Forms.Label.1", "LA" & i & "_" & j, True)
  6.       .Caption = .Name
  7.          .Top = 20 * (i - 1) + 5
  8.          .Left = 160 * (j - 1) + 5
  9.          .Width = 155
  10.          .Height = 18
  11.       End With
  12.     Next
  13. Next
  14. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# Hsieh


   Á ¶Wª© ¨Ó¥h¸Õ¬Ý¬Ý^^

TOP

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

°ÝÃD1.rar (6.87 KB) ¦^´_ 6# Hsieh



½Ð°Ý¶Wª©  §Ú¥Î¤U¦Cµ{¦¡½X¦b¦Û­qªí³æ¤W ¥Í¥X³o¨Çlabel  ¨º­n«ç¦b¥t¤@­Ó«öÁä (§ïÅÜ)¤¤ §ïÅÜLA0ªºCAPTION©O? ³£¤@ª½»¡ §ä¤£¨ìª«¥ó

¥t¥~ ¦pªG·Q§R°£³z¹Lµ{¦¡½X¥Í¦¨ªº±±¨î¶µ(¹³¬OLabel)¤S­n«ç¼g©O??
    Private Sub CommandButton2_Click()
For j = 0 To 32
              For i = 0 To 6           
                With Controls.Add("Forms.Label.1", "LA" & j + i, True)'½Ð°Ý³o¦æ¤¤ªº TRUE ¬O¤£¬O«ü ­nÅã¥Üªº·N«ä?
                   .Caption = .Name
                   .Font.Size = 12
                   .BorderStyle = 1
                   .ForeColor = &H80000012
                   .Top = 42 + (j * 14)
                   .Left = i * 70
                   .Width = 70
                   .Height = 16
                   .TextAlign = 3
             end with
    next  i
next j
=======================================================
¥t¥~¤£ª¾­n«ç¼g°j°é¯àªí²{¥X¤U¤è³oºØ±¡ªp©O?

¸Õ¤F¦n¤[¦ý³£¸Õ¤£¥X¨Ó ¹³¤U¤èªºµ{¦¡½X«ç­n«ç¼g. ¥ÎÂù°j°é ¤]¼g¤£¥X¨Ó

1ªº10
2ªº9
3ªº8
4ªº7
5ªº6
6ªº5
7ªº4
8ªº3
9ªº2
10ªº1

TOP

¦^´_ 8# icestormer
ªí³æª«¥ó¥u¯à¥ÎÁôÂ䣯à§R°£
  1. Private Sub CommandButton1_Click()
  2. If ComboBox1 = "" Then Exit Sub
  3. Me.Controls(ComboBox1.Text).Visible = False  '.Caption = "ar"
  4. ComboBox1.RemoveItem ComboBox1.ListIndex
  5. ComboBox1 = ""
  6. End Sub

  7. Private Sub CommandButton2_Click()
  8. Me.Controls(ComboBox1.Text).Caption = TextBox1
  9. End Sub

  10. Private Sub UserForm_Initialize()
  11. '·s¼W2Äæ8¦C
  12. For j = 1 To 2
  13. k = 0
  14.     For i = 1 To 10
  15.     k = k + 1
  16.       With Controls.Add("Forms.Label.1", "LA" & k & "_" & 10 - k + 1 & "_" & j, True)
  17.       .Caption = .Name
  18.          .Top = 20 * (i - 1) + 5
  19.          .Left = 160 * (j - 1) + 5
  20.          .Width = 155
  21.          .Height = 18
  22.          ComboBox1.AddItem .Name
  23.       End With
  24.     Next
  25. Next
  26. End Sub
½Æ»s¥N½X
play.gif
¬¡­¶Ã¯1.rar (11.24 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 9# Hsieh


   Á ¶Wª©  ¨Ó¥h¸Õ¬Ý¬Ý

TOP

        ÀR«ä¦Û¦b : ¨ü¤HÂI¤ô¤§®¦¡A¶··í´é¬u¥H³ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD