¦p¦ó¨Ï TextBox3.Text ¬°¤@Ó TextBox(i).Text ¨Ó¨Ï¥Î
- ©«¤l
- 258
- ¥DÃD
- 77
- ºëµØ
- 0
- ¿n¤À
- 385
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2010-8-8
- ³Ì«áµn¿ý
- 2021-1-25
|
¦p¦ó¨Ï TextBox3.Text ¬°¤@Ó TextBox(i).Text ¨Ó¨Ï¥Î
½Ð±Ð¦U¦ì¤j¤j:
VBA¤¤ªí³æ¤º¬Y Sub
For i = 2 To lastrow1
If Cells(i, 4) = TextName.Text Then
TextBox3.Text = Sheets("¾Ç¥Í¸ê®Æ").Cells(i, 6)
TextBox4.Text = Sheets("¾Ç¥Í¸ê®Æ").Cells(i, 7)
TextBox5.Text = Sheets("¾Ç¥Í¸ê®Æ").Cells(i, 8)
TextBox6.Text = Sheets("¾Ç¥Í¸ê®Æ").Cells(i, 9)
endif
next
loop¤¤ ·í§ä¨ì²Ä¤GÓ Cells(i, 4)
À³¦p¦ó¨Ï Sheets("¾Ç¥Í¸ê®Æ").Cells(i, 6)¶ñ¤J TextBox7.Text
¤]´N¬O»¡¦p¦ó¨Ï TextBox3.Text ¬°¤@Ó TextBox(i).Text ¨Ó¨Ï¥Î
ÁÂÁ¨ó§U |
|
|
|
|
|
|
- ©«¤l
- 559
- ¥DÃD
- 58
- ºëµØ
- 0
- ¿n¤À
- 626
- ÂI¦W
- 0
- §@·~¨t²Î
- win8
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2010-11-22
- ³Ì«áµn¿ý
- 2024-6-14
|
¦^´_ 8# oobird
ÁÂÁÂo¤j¤jªº±Ð¾É~
§Ú¥ç±N¨äק令
Yuserform1¤¤ªºlabel ¨C¤@±Æ15¦C ¨Ó±Æ¦C
sheet1ªº¸ê®Æ=>¥Î¨Ó§PÂ_label¦@»Ýn±Æ´X¦C
²Ä¤@¶¥¬q¤w¸g¥i¥H¨Ìsheet1ªºdata =userform1¤¤ªºlabel.caption
¥ç¦P®É·s¼Wtextbox
¦AÄ~Äò©µ¦ù¤@Ó°ÝÃD( ¦p¦ó¦A±Nuserform1¤¤ªºlabel & textbox¦s¨ìsheet2)
Y¦buserform1 ¹w³]¤@Ócommandbutton1 ±Nuserform1¤¤label & textboxªº¸ê®Æ
§ì¨ú¨ìsheet2
sheet2.AÄæ ¦s©ñuserform1.label
sheet2.BÄæ ¦s©ñuserform1.textbox |
|
¾Ç²ß¤~¯à´£¤É¦Û¤v
|
|
|
|
|
- ©«¤l
- 1572
- ¥DÃD
- 16
- ºëµØ
- 2
- ¿n¤À
- 1521
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2016-1-13
|
¥»©«³Ì«á¥Ñ oobird ©ó 2012-3-5 12:45 ½s¿è
- Private Sub UserForm_Initialize()
- rng = Range([a1], [A65536].End(3))
- For i = 1 To UBound(rng)
- Set b = Me.Controls.Add("Forms.Label.1")
- With b
- .Height = 10
- .Width = 10
- .Top = 15 * i
- .Left = 20
- .Caption = rng(i, 1)
- End With
- Next
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 559
- ¥DÃD
- 58
- ºëµØ
- 0
- ¿n¤À
- 626
- ÂI¦W
- 0
- §@·~¨t²Î
- win8
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2010-11-22
- ³Ì«áµn¿ý
- 2024-6-14
|
¦^´_ 4# GBKEE
Dear G¤j¤j & ¦U¦ì¤j¤j
¤p§Ì¹ï±±¨î¶µ(¦p:listbox,textbox.label)ªºÀ³¥Î~ ·Q½Ð±z«ü¾É¤@¤U~
Y¬O§Úªºdata¬ONµ§ (¨C¦¸¤@§ó·s¼Æ¶q¤£¤@)
§Ún¦p¦ó¦bUserForm¤¤²£¥Í¬Û¹ïÀ³ªºLabel
ex.
sheet1 A1:A10 Àx¦s®æªºÈ¬°A~J
SHEET1 ¤¤¦³¹w³]¤@ÓCommandButton1 ÂI¿ï«á·|¸õ¥X¤@ÓUserForm1
¨Ã¦Û¦æ²£¥Í10ÓLabel
Label1.Caption=A
Label2.Caption=B
.
.
Label1.Caption=J
¦bVBA¤¤¬O§_¥i¥H°µ¨ì³o¼Ëªº¥\¯à~ ¦³ÂI°ÊºAªºÅã¥Ü~ |
|
¾Ç²ß¤~¯à´£¤É¦Û¤v
|
|
|
|
|
- ©«¤l
- 258
- ¥DÃD
- 77
- ºëµØ
- 0
- ¿n¤À
- 385
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2010-8-8
- ³Ì«áµn¿ý
- 2021-1-25
|
¤Ó´Î¤F ¡A§¹¥þ¸Ñ¨M¡C
¨ä¥LControlsÀ³¬O¥i¦pªkªw»s¤~¹ï
GBKEE¡Aet5323 ÁÂÁ§Aªù |
|
|
|
|
|
|
- ©«¤l
- 128
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 118
- ÂI¦W
- 0
- §@·~¨t²Î
- WinXP
- ³nÅ骩¥»
- Office2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥|¤t¦¨³£ÊT崃
- µù¥U®É¶¡
- 2010-9-13
- ³Ì«áµn¿ý
- 2017-5-12
|
¦A简¤Æ点:
Dim i%,ii%
For i = 2 To lastrow1
If Cells(i, 4) = TextName.Text Then
For ii = 3 To 80
Controls("TextBox" & ii).object.Value = Sheets("¾Ç¥Í¸ê®Æ").Cells(i, 6 + ii - 3)
Next
End If
Next |
|
|
|
|
|
|
- ©«¤l
- 258
- ¥DÃD
- 77
- ºëµØ
- 0
- ¿n¤À
- 385
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2010-8-8
- ³Ì«áµn¿ý
- 2021-1-25
|
ÁÂÁÂGBKEE
§ÚªºTextBox¦³80Ó
°}¦C Ar = Array(TextBox3, TextBox4, TextBox5....)
¬O§_¤@©wn¼g¦ÜTextBox80¡H
Ar ³]©w»yªk
Dim ar(80) as string ¬O§_¥¿½T »Ýn
©Î¬O ¥un
set Ar = Array(TextBox3, TextBox4, TextBox5....)
©Î¬O ¥un
Ar = Array(TextBox3, TextBox4, TextBox5....) |
|
|
|
|
|
|