Browse Button

Closed
Report
-
 Blocked Profile -
Hello,
i m new to vb script..actually in VBscript i want to create a browse button in the input box inorder to browse my files stored in the lcation..so i need the code for that..

1 reply


Hello Sir,

This is the command to create a browse button:

On Error Resume Next
Const BIF_EDITBOX = &H10
Const BIF_NEWDIALOGSTYLE = &H40
Set sa = CreateObject("Shell.Application")
Set oF = sa.BrowseForFolder(0, "My Computer:",_
BIF_EDITBOX Or BIF_NEWDIALOGSTYLE)

oFolder = oF.Items.Item.path
If Err.Number > 0 Then
MsgBox("You have not selected a folder." & vbCrlf &_
"This script will not continue!")
Err.Clear
Else
wscript.echo oFolder
End If


Hope this works for you

Thanks
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month