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

[µo°Ý] VBA¥i¥H°µ¨ì³]­p¼u¥X¦¡µ¡Åý¨Ï¥ÎªÌÂI¿ïÀÉ®×¥H¶×¤Jªº¥\¯à¶Ü?

[µo°Ý] VBA¥i¥H°µ¨ì³]­p¼u¥X¦¡µ¡Åý¨Ï¥ÎªÌÂI¿ïÀÉ®×¥H¶×¤Jªº¥\¯à¶Ü?

½Ð±Ð¦U¦ì«e½ú¡A¥Ø«e¤p§Ì¶×¤J.TXTÀɳ£¬O­nÂI¿ï"¸ê®Æ-¨ú±o¥~³¡¸ê®Æ-±q¤å¦rÀÉ"(2007)¨Ó¶×¤J¡A¤§«á¦A¶i¦æ¤À³Î¡C¥H¤U¬°³¡¤À¿ý»s¥X¨Óªº¤º®e¡C
QueryTables.Add(Connection:="TEXT;C:\Users\Administrator\Desktop\Excel½m²ß\test.txt", Destination:=Range("$A$1"))
­Y¦¹Àɮשñ¦b§Oªº¸ô®|¡A¥H¤Wcode´N¤£¯à¥Î¤F¡C
½Ð°Ý¬O§_¯àÂÇ¥ÑVBA¨Ó¹ê²{¸õ¥Xµøµ¡Åý¨Ï¥ÎªÌ¦Û¦æ¿ï¾ÜÀÉ®×?
ÁÂÁÂ!!

³Ì²³æªº¤è¦¡

¥Îinputbox ªº¤è¦¡¡AÅý¨Ï¥ÎªÌ¿é¤J
¬O¾Çµ{¦¡¦Ó¤£¬O­nµ{¦¡¡A¬O¶i¨Bªº°ò¦

TOP

¥»©«³Ì«á¥Ñ gary0228 ©ó 2010-10-12 10:47 ½s¿è

¦^´_ 2# ·t¶Â

¶â¡AÁÂÁ·t¶Â«e½úªº¦^ÂСC
¦pªG¥Îinputboxªº¸Ü¡A¨Ï¥ÎªÌÁÙ¬O»Ý­n§â¸ô®|¿é¤J¹ï¸Üµ¡¤¤¡A¤£«ç»ò¤è«K¡C
§Æ±æ¬O¥i¥H¹³Windows¶}±ÒÂÂÀɪº¤è¦¡¡A¸õ¥Xµøµ¡Åý¨Ï¥ÎªÌ¿ï¾Ü­n¶×¤JªºÀɮסAµL½×¦¹Àɮשñ¦b­þªº¸ô®|¤U¡C
ÁÂÁÂ!

TOP

Dim Fname As String
Fname = Application.GetOpenFilename("¤å¦r¤å¥ó,*.txt")
If len(Fname)>0  Then

TOP

¦^´_ 4# oobird

ÁÂÁÂoobirdªº¦^ÂСA­ì¨Ó¨Ï¥ÎGetOpenFilename¤èªk´N¥i¥H¤F¡C
·P¶â!

TOP

½Ð±Ð°ª¤â­Ì,¦pªG§Æ±æ¦b¼u¥X¦¡µ¡Åý¨Ï¥ÎªÌ¦P®ÉÂI¿ï¦h­ÓÀɮ׶פJ
®ÉÀ³¦p¦ó³]©w©O?ÁÂÁÂ!!

TOP

¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁÂHsieh¤j,½Ð°Ý¤@©w­n¥ÎApplication.FileDialog(msoFileDialogOpen),¤£¯à¥ÎGetOpenFilename¶Ü?ÁÂÁÂ!!

TOP

¦^´_ 8# yafeii
  1. Sub nn()
  2. Dim FileToOpen
  3. FileToOpen = Application _
  4.     .GetOpenFilename("Text Files (*.txt), *.txt", , , , True)
  5. If IsArray(FileToOpen) Then
  6.     MsgBox Join(FileToOpen, Chr(10))
  7.     ElseIf FileToOpen <> False Then
  8.     MsgBox FileToOpen
  9. End If
  10. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁÂHsiehª©¤j~~!!

TOP

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD