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

VBAªí³æ¿é¤J·|ªþ¥[³sµ²

VBAªí³æ¿é¤J·|ªþ¥[³sµ²

·Q½Ð°Ý¤@¤U¤j¤j
¦pªG¦bTextBox ¤W­±¿é¤J³sµ²ºô§}
¦s¤JExcelÄæ¦ì¥u¬O¤@¯ë¦r¦ê

­n²K¥[¤°»òµ{¦¡½X
¤~·|Åý¦Û¤v¿é¤JªºÄæ¦ì¤@²vÅã¥Ü "³sµ²¸ô®|" ¥|­Ó¦r
«o¦³³sµ²¦Û¤v¿é¤Jªº¦ì¸m¥\¯à©O? ?  (@@)
Jared

¥»©«³Ì«á¥Ñ luhpro ©ó 2013-8-9 00:07 ½s¿è

¦^´_ 1# Jared
TextBox1 ©ñ³sµ²ºô§}
TextBox2 ©ñ¥ØªºÀx¦s®æ¦ì§}, ¨Ò¦p :  F12
CommandButton1 ±Ò°ÊÂà´«§@·~
  1. Private Sub CommandButton1_Click()
  2.   With Sheets("Sheet1")
  3.     .Hyperlinks.Add Range(TextBox2.Text), TextBox1
  4.     Range(TextBox2.Text) = "³sµ²¸ô®|"
  5.   End With
  6. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# luhpro


ÁÂÁ¤j¤jªº«ü±Ð ^^
§Úµo²{¦pªG¬O¦b Dim ³o¸Ì³]©w
TextBox1 = "file:///" & TextBox1

´N·|¦³³sµ²¸ô®|ªº¥\¯à
¥u¬O¤£·|¦³«ü©wÅã¥Ü¤å¦rªº®ÄªG
§Ú¦A¬ã¨s¬Ý¬Ý
Jared

TOP

¥»©«³Ì«á¥Ñ Jared ©ó 2013-8-29 11:17 ½s¿è

§Ú°µ¤F¤@­Ó²³æªº´ú¸Õ
¦ýÁÙ¬O§Æ±æ¯à°÷«ü©w¥X²{¤å¦r
¨Ã¦³³sµ²¿é¤J¦ì¸mªº¥\¯à

¦]¬°§Ú¥Ø«eµ{¦¡¬O¨Ï¥Î§PÂ_¦³¸ê®Æ´N©¹¤U·s¼Wªº¤è¦¡
©Ò¥H¨Ï¥Î«ü©wªí³æÄæ¦ìªº¼gªk´N¤£¦æ¤F...

§Æ±æ¯à¦³°ª¤H¨ó§U
·P¿E¤£ºÉ ~><

Test.zip (13.14 KB)


  1. Dim Q, Ar
  2. Private Sub CommandButton1_Click()
  3. Ar = "file:///" & TextBox1

  4. If TextBox1 <> "" Then

  5. Q = 1
  6.    Do Until Cells(Q, 1) = ""
  7.        Q = Q + 1
  8.    Loop
  9.    
  10.    With Sheet1
  11.    .Cells(.Rows.Count, 1).End(xlUp).Offset(1).Resize(, 1).Value = Ar
  12.    End With

  13. Else
  14. If TextBox1 = "" Then MsgBox "³sµ²ºô§}¥¼¶ñ¼g¡A³Â·ÐÀˬd¡I"
  15. End If


  16. End Sub

  17. Private Sub CommandButton6_Click()
  18.     UserForm1.Hide
  19. End Sub

  20. Private Sub CommandButton7_Click()
  21. TextBox1 = ""
  22. End Sub
½Æ»s¥N½X
Jared

TOP

¦^´_ 4# Jared
2#¤£¬O¤w¸g¼g¤F¶Ü?
  1.   With Sheet1
  2.     With .Cells(.Rows.Count, 1).End(xlUp).Offset(1)
  3.       .Hyperlinks.Add .Cells(1, 1), TextBox1
  4.       .Value = "³sµ²¸ô®|"
  5.     End With
  6.   End With
½Æ»s¥N½X

TOP

¦^´_ 5# stillfish00

ÁÂÁ¤j¤j¸Ñµª
¦]¬°§Ú³o­Ó´ú¸Õªí³æ¥u¦³¤@ºØ¸ê®Æ
­ì¥»§Úªºªí³æ¤W­±
¦³NºØ­n¶ñªºTextBox1
³sµ²¦ì¸m¥u¬O³Q§¨¦b¤¤¶¡

­ì¥»µ{¦¡¤j·§¬O³o¼Ë
  1. Dim Ar,a1,a2,a3,a4,a5
  2. a1 = ComboBox1 '¸ê®ÆA
  3. a2 = ComboBox2 '¸ê®ÆB
  4. a3 = ComboBox3 '³sµ²¦ì¸m
  5. a4 = ComboBox4 '¸ê®ÆD
  6. a5 = ComboBox5 '¸ê®ÆE

  7. Ar = Array(a1, a2, a3, a4, a5)
  8. If a1 <> "" And a2 <> "" And a3 <> "" And a4 <> "" And a5 <> ""  Then
  9. Q = 1
  10.    Do Until Cells(Q, 1) = ""
  11.        Q = Q + 1
  12.    Loop
  13.    With Sheet1
  14.    .Cells(.Rows.Count, 1).End(xlUp).Offset(1).Resize(, 5).Value = Ar
  15. End With
  16. Else
  17.       If a1 = "" Then MsgBox "¸ê®ÆA¥¼¶ñ¼g¡A³Â·ÐÀˬd¡I"
  18.       If a2 = "" Then MsgBox "¸ê®ÆB¥¼¶ñ¼g¡A³Â·ÐÀˬd¡I"
  19.       If a3 = "" Then MsgBox  "¸ê®Æ³sµ²¥¼¶ñ¼g¡A³Â·ÐÀˬd¡I"
  20.       If a4 = "" Then MsgBox  "¸ê®ÆD¥¼¶ñ¼g¡A³Â·ÐÀˬd¡I"
  21.       If a5 = "" Then MsgBox "¸ê®ÆE¥¼¶ñ¼g¡A³Â·ÐÀˬd¡I"
½Æ»s¥N½X
¦pªG»¡¤j¤j¸Ñµªªºµ{¦¡­n©ñ¦b¸Ì­±
¨º­n«ç»ò­×§ï¤~¯à¦b²Ä¤Tµ§¸ê®ÆÂର³sµ²¦ì¸m
¦Ó¨ä¥Lµ§¸ê®Æ¦A­Ó§O¼g¤W©O?
ÀYµh¤¤><
Jared

TOP

¦^´_ 6# Jared
  1.   With Sheet1
  2.     With .Cells(.Rows.Count, 1).End(xlUp).Offset(1)
  3.       .Resize(, 5).Value = Ar
  4.       .Hyperlinks.Add .Offset(, 2), ComboBox3
  5.       .Offset(, 2).Value = "³sµ²¸ô®|"
  6.     End With
  7.   End With
½Æ»s¥N½X

TOP

¦^´_ 7# stillfish00


ÁÂÁ¤j¤jÀ°¦£
µ{¦¡¤w¸g¥i¥H°õ¦æ
«á¨Óµo²{´£¨Ñªºµ{¦¡¸ÌÀY¦³ÂI¿ù»~
À³¸Ó¬O TextBox1 ¦Ó¤£¬O ComboBox1
³Ì«á¤]§Ñ¤F¥[¤WEnd  If
¦b¦¹°µ­Ó­×¥¿

¤j¤j´£¨Ñªº¸Ñµª
¬O·Ó­ì¥ý¤è¦¡¥ý±N¸ê®Æ¶ñ¤W¥h
¦A§â­nªþ¥[³sµ²ªºÄæ¦ì¸ê®Æ¦A¥t¥~ÂÐ¥[¤W¥h¶Ü?
¤£¾å±oÁÙ¥i¥H³o¼Ë¨Ï¥Î
¦A¦¸·PÁ¤j¤jªº¸Ñµª (^^ )
Jared

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD