Sub Main()
Dim objXLApp
Dim objXLBook
Dim fso, f As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile("登錄.xls")
Dim n
n = fso.GetParentFolderName(f.Path)
Set objXLApp = CreateObject("Excel.Application")
objXLApp.Visible = True
Set objXLBook = objXLApp.Workbooks.Open(n & "\登錄.xls")
Set objXLBook = Nothing
' objXLApp.Quit
Set objXLApp = Nothing
Set fso = Nothing
Set n = Nothing
Set f = Nothing
End Sub
請教大大
欲將此vb轉為*.exe檔
夢想*.exe中的*可取為任何字元之後,"登錄"若為變數am am=*
則*.exe與*.xls只要取同檔名即可
故應如何取得本身開檔*.exe的*作者: yangjie 時間: 2010-11-6 00:13