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

[µo°Ý] TEXTBOX«O¯d¿é¤J¹Lªº¦r¤¸

[µo°Ý] TEXTBOX«O¯d¿é¤J¹Lªº¦r¤¸

¦U¦ì¤j¤j¡A§Ú¦bexcel¤W«Ø¥ß¤F¤@­Óuserform¡A¦A«Ø¦ì¤@­Ótextbox¿é¤J¨ì¬Y¤@­Ócell
§Ú·Q°Ý«ç¼Ë¤~¥i«O¯dtextbox©Mcell¤ºªº°O¿ý¡A§Y¤£¥Î¨C¦¸¶}¥X¨Ó³£¤£¥Î¦A¿é¤J©O?
¥ýÁ¤j®aªº¦^ÂÐ

¦^´_  apao2000
¥u¦³¤ù¬qµ{¦¡½X¡AµLªkª¾¹D§Aªº¥Î·N¡A¦pªG³æ¯Âµ²§ô³oµ{§Ç¡A¥[¤Wexit sub§Y¥i
 If Sh ...
Hsieh µoªí©ó 2014-3-13 18:27


¦]¬°§Ú«Ø¥ß¤F¤T­Óoptionbutton¥Nªí¤T­Ólocation "A¼Ó" "B¼Ó" "C¼Ó"¡AµM«á¦b¤U­±ªºtextbox¿é¤J¤J­Ü½s¸¹¦A«öcommandbutton«ü¥Ü¦C¦L :¨Ò¦p802-14031301(location+in house no)
¦Ó¤§«e¦p§Ñ°OÂIoptionbutton¡A¦L¥Xªºlabel·|¨S¦³locationªº¡A©Ò¥H·Q¥Î¤èªkªý¤îµo¥Í³o­Ó°ÝÃD¡A¦Ó§Ú°µ¨ì¥u¥i¥H¡A¦p¨SÂIoptionbutton·|¼u¥Xĵ§i "please choose location!"¡A¦ý«öok«á¤´·|Ä~Äò°õ¦æ¦C¦L°Ê§@........§Æ±æ§A·|©ú¥Õ§Úªº·N«ä

TOP

Thank you Hsieh:
©ú¤Ñ¦^¤½¥q¸Õ¸Õ§a¡A¨ä¹ê§Ú¤@ÂIVBAªºª¾Ãѳ£¨S¦³¡A¹ï«Ü¦h»yªk³£¤£À´¡A³£¬O¤Wºô§ä¤@¨ÇÃþ¦üªº¦A¦Û¤v§ï¤@§ï¸Õ¸Õ¬Ý¡A©Ò¥H§Ú³£¤£¤ÓÀ´µo°Ý¥O¨ì¦U¦ì³£¼Ò¤£着ÀY¡A¦ý¦U¦ì³£ºÉ¤O¬Û§U¡A·P¿E¸U¤À!

TOP

¦^´_ 11# apao2000
¥u¦³¤ù¬qµ{¦¡½X¡AµLªkª¾¹D§Aªº¥Î·N¡A¦pªG³æ¯Âµ²§ô³oµ{§Ç¡A¥[¤Wexit sub§Y¥i
 If Sheet1.Cells(1,1) = "" Then
  MsgBox "Please choose location!", vbOKonly
exit sub
  End If
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_  apao2000
Hsieh µoªí©ó 2014-3-13 15:54



    Thank you Hsiehªº¦^ÂСA§Ú©Òªº¤èªk¬O commandbutton_click() ¸Ì­±¥[¦h¤@¦æ Me.TextBox1.Value = "" ³£°µ¨ì§Úªº®ÄªG
   ¦ý¤S¦³¥t¤@­Ó°ÝÃD´N¬O¦P¼Ëcommandbutton_click() ¼g¤J¥H¤Uµ{¦¡¡A¦ýÂI¤Fok«á¤´·|°õ¦æprint out°Ê§@¡A¦p¦ó¤~¥i«ö¤Fok´N°±¤î¡A¥iÅý§Ú°µ¦^¤W¤@­Ó°Ê§@¡A§Ú¤Ó¦h°ÝÃD¤F½Ð¦U¤j¤j¨£½Ì
  If Sheet1.Cells(1,1) = "" Then
  MsgBox "Please choose location!", vbOKonly
  End If

TOP

¦^´_ 3# apao2000
  1. Private Sub UserForm_Initialize() 'ªí³æªì©l¤Æ®ÉIJµo
  2. TextBox1 = Sheets(1).[A1] '±NA1ªº­È¼g¤J
  3. End Sub

  4. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) 'ªí³æÃö³¬®ÉIJµo
  5. Sheets(1).[A1] = TextBox1 '±N¤å¦r¤è¶ô¤º®e¼g¤JA1Àx¦s®æ
  6. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦hÁ¦U¦ì¡A§Ú¤w©ó¨ä¥L°Q½×°Ï§ä¨ì¥i¥Îªºµ{¦¡¤F

TOP

¦^´_  stillfish00
stillfish00 µoªí©ó 2014-3-11 19:25



    stillfish¥S¡A¤w¸Õ¹L¤F¡A¦ý¨S¦³¦^¶Çµ¹textbox1¡A½Ð°ÝtextboxªºÄݩʦ³¨S¦³Ãö«Y©O?

TOP

¦^´_  stillfish00
stillfish00 µoªí©ó 2014-3-11 19:25


ÁÂÁÂstillfish¤j¤j¡A©ú¤Ñ¦^¤½¤W¸Õ¤U¥ý

TOP

¦^´_ 4# stillfish00
  1. Private Sub TextBox1_Change()
  2.   ThisWorkbook.Sheets(1).[A1].Value = TextBox1.Value
  3. End Sub

  4. Private Sub UserForm_Initialize()
  5.   ThisWorkbook.IsAddin = True
  6.   TextBox1.Value = ThisWorkbook.Sheets(1).[A1].Value
  7. End Sub

  8. Private Sub UserForm_Terminate()
  9.   ThisWorkbook.IsAddin = False
  10.   'Unload Me
  11. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD