I need to associate a "scanned" in barcode with a file on the computer. Once I scan in the bar code what code do I use to automaticaly bring up a "windows explorer" window to browse to the file that I want to associate with it?
Thank you
Printable View
I need to associate a "scanned" in barcode with a file on the computer. Once I scan in the bar code what code do I use to automaticaly bring up a "windows explorer" window to browse to the file that I want to associate with it?
Thank you
Use this to open Explorer to any folder that you wish on your hard drive.VB Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Const SW_SHOWNORMAL = 1 Private Sub OpenExplorer(Optional StartDirectory As String) ShellExecute 0, "Explore", StartDirectory, vbNullString, vbNullString, SW_SHOWNORMAL End Sub Private Sub Command1_Click() 'To Launch Windows Explorer With Specific Directory OpenExplorer ("C:\Program Files\") End Sub