©óvb¤¤¦p¦ó¨Ï.xls¼W¤@µ§¸ê®Æ¦sÀÉ
- ©«¤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
|
©óvb¤¤¦p¦ó¨Ï.xls¼W¤@µ§¸ê®Æ¦sÀÉ
´N±Ð©ó¦U¦ì¤j¤j:
Ó¤H´¿¨üKeeKing«ü¾É¤§¤U¡A¼g¤Fform¤§VB
¥i¥H¬d¸ß«oµLªk¼W¤@µ§¸ê®Æ¡AÀ³¦p¦ó³B²z¡H
Dim Book As Object
Dim Book1 As Object
Dim n
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Initialize()
Dim fso, F As Object, Box, Tile$
Tile = "Àɮ׸ô®|¦WºÙ"
On Error GoTo ER
Set fso = CreateObject("Scripting.FileSystemObject")
Set F = fso.GetFile("µn¿ý.xls")
n = fso.GetParentFolderName(F.Path)
Set Book = CreateObject(n & "\µn¿ý.xls")
Set Book1 = Book.sheets("¾Ç¥Í¸ê®Æ")
For I = 1 To 6
Me.Controls("Label" & I).Caption = Book1.cells(1, I)
Next
Text1 = ""
Exit Sub
ER:
Set fs = CreateObject("Scripting.FileSystemObject")
Box = InputBox(Tile, Tile)
If Box = "" Then End
If fs.FileExists(Box) Then
Set Book = CreateObject(Box)
Else
GoTo ER
End If
Err.Clear
Resume Next
End Sub
Private Sub Text1_Change()
Dim Rng As Object, E, I%, C&
C = Book1.range("a1").End(4).Row
For Each E In Book1.range("a2:a" & C)
If E = Text1 Then Set Rng = E: Exit For
Next
If Not Rng Is Nothing Then
Book1.cells(C + 1, 1) = Text1
For I = 1 To 5
Me.Controls("Label" & I + 6).Caption = Rng.cells(1, I + 1)
Book1.cells(C + 1, I + 1) = Rng.cells(1, I + 1) '¹Á¸Õ¼W¥[¤@µ§¸ê®Æ¡A°£«D¦Û¦æ¥t¥~¶}.xls¤~·|¼g¤J
Next
Else
For I = 1 To 5
Me.Controls("Label" & I + 6).Caption = ""
Next
End If
End Sub |
|
|
|
|
|
|
- ©«¤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
|
|
|
|
|
|
|
- ©«¤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ÁÂGBKee¡C
¥iSave¤F¡A¥u¬O¹ïExcelÅܦ¨µøµ¡ÁôÂáA¥i§_¦bVB¤U¹ï.xls¤U«ü¥O¨Ïvisible=true-----°ÝÃD¤@¡C
¨Ã½Ð±Ðª©¥D:ºô¶³sµ²VB»sµ{ªº.exe ¥Ñ.exe¥h«ü©w"Excel Application"¶}.xls(§tVBA)¡A¦¹®É²×ºÝ¾÷¥i°õ¦æ§_?
(©óPC¤U¥i°õ¦æ¨S°ÝÃD)(³o½g¤£ª¾¦p¦óªþ¤Wªþ¥ó¡A¥i¯à¬O¤p¾Ç¥ÍªºÃö«Y) |
|
|
|
|
|
|
- ©«¤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
|
ÁÂÁÂHsiehª©¥D
¥HEXCELÀɬ°¸ê®Æ®w°µ¸ê®Æ®w¬d¸ß¡A¼g¤J
¤S¦p¦ó¤U»yªk¡A¥i§_½ç±Ð¡I
Set Book = CreateObject(n "\µn¿ý.xls")
»Pconnection ¬O¥G²£¥Í«½Æ¶}ÀÉ¿ù»~
À³¦p¦ó¤U¤â¡AÀµ½Ð½ç±Ð |
|
|
|
|
|
|