vba

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top