外部打开文本文件代码:(两种方法)
' 外部打開文件
ActiveWorkbook.FollowHyperlink Address:=strOutPath, NewWindow:=False, AddHistory:=True
‘ 外部打開文件
Call Shell("NOTEPAD.EXE " & strOutPath, vbNormalFocus)
内部打开文本文件代码:
Set fss = CreateObject("Scripting.FileSystemObject")
Set ff = fss.OpenTextFile(strOutPath, 8, -2)
住:strOutPath为文本文件路径
在后台打开Excel文件代码:
dim wk as workbook
set wk=getObject(strFilePath)
注:strFilePath为Excel文件路径