Hey ppl,
I'm quite new to excel and visual basic so not that good with it yet.. I need to make a simple importing macro.. ok that wasnt so hard... But I need it to have a relative path, and for some reason it works when I use
but when I use
it doesn't... can anyone help me out on this one.. As far as I know there are no other ways to import the file.
Also the second thing that got me is I need to get a file open dialog if the file can't be found.. Googled my ass off without any luck.. hope you can help me out.
I'm quite new to excel and visual basic so not that good with it yet.. I need to make a simple importing macro.. ok that wasnt so hard... But I need it to have a relative path, and for some reason it works when I use
Code:
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;I:\Documents\Artikel.txt", Destination:=Range("A1"))
but when I use
Code:
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;.\Artikel.txt", Destination:=Range("A1"))
it doesn't... can anyone help me out on this one.. As far as I know there are no other ways to import the file.
Also the second thing that got me is I need to get a file open dialog if the file can't be found.. Googled my ass off without any luck.. hope you can help me out.