°»´ú"1.xls"ÀɬO§_§e¥´¶}ª¬ºA?
- ©«¤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
|
°»´ú"1.xls"ÀɬO§_§e¥´¶}ª¬ºA?
½Ð±Ð¦U¦ì¤j¤j:
Ó¤H¦b¥ÎVBA¥´¶}¥t¥~ExcelÀɦp"1.xls"ÀÉ,Y³{"1.xls"ÀÉ¥»¨Ó´N¤w§e¥´¶}ª¬ºA®É,´N¤£¤Ó«ê·í¡C
½Ð±Ð¦U¦ì¥ý¶iYn°»´ú"1.xls"ÀɬO§_§e¥´¶}ª¬ºA?À³¦p¦ó¹B¥ÎVBA»yªk? |
|
|
|
|
|
|
- ©«¤l
- 83
- ¥DÃD
- 17
- ºëµØ
- 0
- ¿n¤À
- 105
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-12-28
- ³Ì«áµn¿ý
- 2018-8-8
|
- bookname = "1.xls"
- For Each wbs In Workbooks
- If UCase(wbs.Name) = UCase(bookname) Then
- MsgBox bookname & " is opened"
- Exit For
- End If
- Next wbs
½Æ»s¥N½X ¥uÀ´³oÓ¡A§Æ±æ¥i¥HÀ°¨ì§A |
|
|
|
|
|
|
- ©«¤l
- 2025
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 2053
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- Office2007
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2024-3-14
|
¦^´_ 2# ¤p«L«È
·s¶}ÀÉ®× BOOK1 ´ú¸Õ¤£¥X¨Ó
ÂÂÀÉ®× S.XLS ´N¥i¥H´ú¸Õ¥X¨Ó
¦n¹³n¦sÀÉ«á¤~¦³®Ä |
|
{...} ªí¥Ü»Ýn¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡
|
|
|
|
|
- ©«¤l
- 83
- ¥DÃD
- 17
- ºëµØ
- 0
- ¿n¤À
- 105
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-12-28
- ³Ì«áµn¿ý
- 2018-8-8
|
¦^´_ 4# Hsieh
¹ï¤£°_¡AJ¶Ã¦^µª¿ùªºµª®×¡A¤Q¤À©êºp:dizzy: |
|
|
|
|
|
|
- ©«¤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
|
¥»©«³Ì«á¥Ñ yangjie ©ó 2012-9-1 04:33 ½s¿è
¦^´_ 4# Hsieh
½Ð±Ð©óªO¥D¥ý¶i
Dim Filt As String
Dim FilterIndex As Integer
Dim fileName As Variant
Dim Title As String
Filt = "Excel Files (*.xls),*.xls"
FilterIndex = 5
Title = "Select a File for Import"
fileName = Application.GetOpenFilename _
(FileFilter:=Filt, _
FilterIndex:=FilterIndex, _
Title:=Title)
If fileName = False Then
MsgBox "No file was selected."
Exit Sub
End If
§Ú¥un±o¨ìfileName ªºÀɦW(string)À³¦p¦ó¤U»yªk?(¤£§tpath)
ÁÂÁÂ |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 7# yangjie ¥Dn
¥Dn¤U¤@¦CnOpen
Set wb = Workbooks.Open(fileName, True, False)
¦ý±`¦b¤w¥´¶}¤§¤U°µ«½Æ¥´¶}
¤£¤äÀ³¦p¦ó³B²z |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 4# Hsieh
Hseih¤j¤j ÁÂÁ±z
Function IsOpen(Fs As String) As Boolean
IsOpen = False
For Each w In Windows
If w.Caption = Fs Then IsOpen = True: Exit For
Next
End Function
¨ä¤¤ fs »P ¤Wzfilename «¬ºA¤£²Å §Ú´N¥d¦í¤F «ç»ò¿ì? |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 4# Hsieh
¹ï¤£°_ ±N¤j¦W«÷¿ù¤F À³¬°Hsieh¤j¤j |
|
|
|
|
|
|