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

¦p¦ó¦bªí³æÅã¥Ü Excel ¬YÄæ¦ìªº¼Æ­È¡H

¦p¦ó¦bªí³æÅã¥Ü Excel ¬YÄæ¦ìªº¼Æ­È¡H

§Ú«Ø¥ß¤F¤@­Óªí³æ¡Aªí³æ¸Ì¦³¨â­Ó textbox¡A¿é¤J­Èªº¸Ü·|¶Ç¦Ü Sheet3 ªºÀx¦s®æ¡I
ºâ§¹¤§«á¡A½Ð°Ý§Ú­n¦p¦ó§âª½§ì¨ìªí³æ¸Ì¡H
¡]¨Ò¦pºâ¥Xªº­È¦b F5ªº¸Ü¡^

§Ú¬O­n¥Î¼ÐÅÒ¥h¨ú­ÈÁÙ¬O¡H

Private Sub CommandButton1_Click()
Sheet3.Range("G3").Value = 1.Text
Sheet3.Range("G10").Value = 2.Text
End Sub

§ä¤F¤@¾ã­Ó¤U¤È¤F~~~~
§Ú¬O¶W¯Å·s¤â¡A¦]¬°¦ÑÁó¬ðµM­n§Ú³]­p Excel VBA¡AÁٽФj¤jÀ°À°¦£¡I

¦^´_ 1# bowwow1975


    ½Ð¤W¶Ç§Aªº½d¨Ò~ ¦]¬°¬Ý¤£À´ §A¤U­±ªº³o¨â¥y¸Ü
   ============================
    ºâ§¹¤§«á¡A½Ð°Ý§Ú­n¦p¦ó§âª½§ì¨ìªí³æ¸Ì¡H
  ¡]¨Ò¦pºâ¥Xªº­È¦b F5ªº¸Ü¡^
   ============================
   ©Ò¿×ªººâ§¹«áªº­È¬O¤°»ò·N«ä??  (§Aªº­È¬O«ç»òºâªº,¬O¤°»ò·N¸q©O??)
   ©Ò¿×ªº­È¦bF5¤S¬O¤°»ò·N«ä??

    °ÝÃDªº´y­z­n§ó²M·¡¤@¨Ç~ ·|§ó¦nª¾¹D§Aªº»Ý¨D­ò~
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 2# hugh0620

¤£¦n·N«ä¡A§ÚÁ¿¸Ô²ÓÂI¡I

¨ãÅé´N¬O¡A§Ú¦b excel ¸Ì³Ð«Ø¤@­Ó«ö¶s¡A¶}±Ò¤@­Óªí³æ¡AµM«áªí³æ¸Ì¦³´X­Ó textbox¡A¨Ã¼W¥[¤@­Ó°õ¦æ«ö¶s¡I
°õ¦æ«á·|§â textbox ªº ª½¶Ç¦Ü Excel Àx¦s®æ¸Ì¡A¥Ñ Excel °µ¹Bºâ¡A¹Bºâ§¹«á¡A§Ú§Æ±æ­È¥i¥H show ¦bªí³æ¤W¡I

PSªí³æ¨S¦³Ãö³¬¡A¥u¬O·Q§Q¥Î Excel °µ¹õ«á¹Bºâ¦Ó¤w¡I

TOP

¦^´_ 3# bowwow1975
¨Ã¼W¥[¤@­Ó°õ¦æ«ö¶s¡I
  1. Private Sub CommandButton1_Click() '³o¬Oªí³æ¤Wªº«ö¶s
  2.     With Sheet3
  3.         .Range("G3").Value = TextBox1.Text   'µLªk¥Î¼Æ¦r©R¦Wªí³æ±±¨î¶µ
  4.         .Range("G10").Value = TextBox2.Text  '¦p 1 ,2 -> 1.TEXT ,2.TEXT ¤£±µ¨ü
  5.         Label1 = .Range("F5").Text            'ªí³æ¥i·s¼W¤@Label±±¨î¶µ ±µ¦¬ F5
  6.     End With
  7. End Sub
½Æ»s¥N½X

TOP

·PÁª©¥D~~~¤S¾Ç¨ì¤F¤@­Ó With ªº¥Îªk¡I
¸Ü»¡¦^¨Ó  Label ªº (name) Äæ¦ì¦n¹³¤£µ¹§ó§ï¡H

TOP

¦^´_ 5# bowwow1975

TOP

¦^´_ 5# bowwow1975


ªí³æªº¬[ºc¹Ï

  1. 'ªí³æ¤ºªºµ{¦¡½X

  2. Private Sub CommandButton1_Click()  'Add

  3. A = Sheet1.Range("A65536").End(xlUp).Offset(1, 0).Row

  4. With UserForm1
  5.      Sheet1.Range("A" & A).Select
  6.      Sheet1.Range("A" & A) = .TextBox2.Text
  7.      .TextBox1.Text = A
  8. End With

  9. End Sub

  10. Private Sub CommandButton2_Click()  '¤W¤@µ§

  11. With UserForm1
  12.      K = .TextBox1.Value - 1
  13.      If K < 3 Then
  14.          MsgBox "¤w¸g¨ì¸ê®Æªº²Ä¤@µ§"
  15.          Sheet1.Range("A3").Select
  16.          .TextBox1.Text = 3
  17.      Else
  18.          Sheet1.Range("A" & K).Select
  19.          .TextBox1.Text = Sheet1.Range("A" & K).Row
  20.          .TextBox2.Text = Sheet1.Range("A" & K)
  21.      End If

  22. End With

  23. End Sub

  24. Private Sub CommandButton3_Click() '¤U¤@µ§
  25. With UserForm1
  26.      K = .TextBox1.Value + 1
  27.      S = Sheet1.Range("A65536").End(xlUp).Row
  28.      If K > S Then
  29.          MsgBox "¤w¸g¨ì¸ê®Æªº³Ì«á¤@µ§"
  30.          Sheet1.Range("A" & S).Select
  31.          .TextBox1.Text = S
  32.      Else
  33.          Sheet1.Range("A" & K).Select
  34.          .TextBox1.Text = Sheet1.Range("A" & K).Row
  35.          .TextBox2.Text = Sheet1.Range("A" & K)
  36.      End If

  37. End With
  38. End Sub

  39. Private Sub UserForm_Activate()  '°õ¦æUserForm®Éªº¦U¶µ¹w³]
  40. '===== ªì©lªºUserFormªº³]©w======
  41. With UserForm1
  42.      .CommandButton1.Caption = "Add"
  43.      .CommandButton2.Caption = "¤W¤@µ§"
  44.      .CommandButton3.Caption = "¤U¤@µ§"
  45.      .Label1.Caption = "²{¦b¬O²Ä"
  46.      .Label2.Caption = "¦C¸ê®Æ"
  47.      .TextBox1.Text = Sheet1.Range("A3").Row
  48.      .TextBox1.Enabled = False
  49.      .TextBox2.Text = Sheet1.Range("A3")
  50. End With
  51. '=================================
  52. End Sub
½Æ»s¥N½X
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 6# GBKEE

ª©¥D~~~§Ú¯uªº·Q¤Á¸¡¦Û±þ~~~§Úµo»}¡A§Ú¤]ª¾¹D±q¨º¸Ì§ï¡I
¦ý¬O­è­è´N¬O¤£µ¹§ï~~~

µM«áµ¥§A¦^ÂФ§«á¡A§Ú¤S¥h§ï~~~~Åܦ¨¥i¥H§ï¤F.............................

TOP

¦^´_ 8# bowwow1975

¨º¬O¥¿±`ªº...
¦³®É­Ô¬O¦]¬°§A°õ¦æ¤¤ ¤£¯à§ï  ©Î°õ¦æ¤¤¦³¿ù»~ ¤]¤£·|µ¹§ï

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

·PÁ¤j¤j­Ìªº«ü¾É±Ð¾Ç

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD