我有一个功能,允许我在桌面上浏览文件,然后返回文件位置。我想在一些函数中使用文件Location变量(strPath here)。我怎样才能做到这一点?
任何帮助将不胜感激
谢谢 缺口
Function FileBrowser() As String
Dim strPath As String
Dim wb As Workbook
strPath = Application.GetOpenFilename(, , "Select your File")
If strPath = "" Then Exit Function
Set wb = Application.Workbooks(GetFilenameFromPath(strPath))
txtboxfileLocation = strPath
End Function