input box

T

TKW

I have inserted in a macro an input box for which I want the user to select a
file (from a folder in one of my network directories) but cannot figure out
how to display what is in this folder for them to choose from to open up the
file in question.

I have used the following logic


With ActiveSheet.QueryTables.Add(Connection:=Array(Array( _
"ODBC;DBQ=G:\COSTING\LOBLAWS\TAB
FILES;DefaultDir=G:\COSTING\LOBLAWS\TAB FILES;Driver={Driver da Microsoft
para arquivos texto (*.txt" _
), Array( _
";
*.csv)};DriverId=27;FIL=text;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UserCommitSync=Yes;" _
)), Destination:=Range("J1"))
.myNum = Application.InputBox(prompt:="Enter a number", Type:=1)
.Name = "LOBLAWS"

Can someone help me figure this out, I am new at this and need all the help
I can get.

Thanks
 
S

Stefan B Rusynko

You can not run VBA (or VBA forms) from a web browser

To see the files on the server take a look at VBscript (ASP) and the FileSystemObject (FSO) object





|I have inserted in a macro an input box for which I want the user to select a
| file (from a folder in one of my network directories) but cannot figure out
| how to display what is in this folder for them to choose from to open up the
| file in question.
|
| I have used the following logic
|
|
| With ActiveSheet.QueryTables.Add(Connection:=Array(Array( _
| "ODBC;DBQ=G:\COSTING\LOBLAWS\TAB
| FILES;DefaultDir=G:\COSTING\LOBLAWS\TAB FILES;Driver={Driver da Microsoft
| para arquivos texto (*.txt" _
| ), Array( _
| ";
| *.csv)};DriverId=27;FIL=text;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UserCommitSync=Yes;" _
| )), Destination:=Range("J1"))
| .myNum = Application.InputBox(prompt:="Enter a number", Type:=1)
| .Name = "LOBLAWS"
|
| Can someone help me figure this out, I am new at this and need all the help
| I can get.
|
| Thanks
 
Top