Hello all,
Will list some code below I am trying to execute.
Have a client who will execute a program from a
shared network drive. Wanting to automatically load a file from network to my excel sheet program. My issue is that on different users computers it might be mapped as F or J or X drive. My code below:
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=loadsheet;DefaultDir=j:\abc;DriverId=27;FIL=text;MaxBufferSize=2048;PageTimeout=5;" _
, Destination:=Range("A1"))
Instead of inserting j: in code is there some way I can incoporate the actual network location, in my scenario
'clients on 'mhw-abc-ex1'
Thanks
Will list some code below I am trying to execute.
Have a client who will execute a program from a
shared network drive. Wanting to automatically load a file from network to my excel sheet program. My issue is that on different users computers it might be mapped as F or J or X drive. My code below:
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=loadsheet;DefaultDir=j:\abc;DriverId=27;FIL=text;MaxBufferSize=2048;PageTimeout=5;" _
, Destination:=Range("A1"))
Instead of inserting j: in code is there some way I can incoporate the actual network location, in my scenario
'clients on 'mhw-abc-ex1'
Thanks