hi.
I have an hta/vbs app that will present a screen. have user click a start button and it should present a dialog box of file in a specific folder. the user will select the file, click the dialog box ok button and it will display the content of the file.
here's what I found in tek-tips vbs:
but this just opens the dialog box, selects the file and when I click the ok button, it errors out.
thanks.
I have an hta/vbs app that will present a screen. have user click a start button and it should present a dialog box of file in a specific folder. the user will select the file, click the dialog box ok button and it will display the content of the file.
here's what I found in tek-tips vbs:
Code:
Dim objShell
Dim strFileName
Dim strFilePath
Dim objFile
Set objShell = CreateObject("Shell.Application")
Set objFile = objShell.BrowseForFolder(0, "Choose a file:", &H4000)
strFileName = objFile.Title
strFilePath = objFile.self.Path
MsgBox "Just the file name: " & strFileName & vbcrlf & "The full path: " & strFilePath
Set objFileName = Nothing
Set objFilePath = Nothing
Set objShell = Nothing
thanks.