file import

  • Thread starter Thread starter BubBob
  • Start date Start date
B

BubBob

Hi,

How can i open a file from vb and ignore the file extension or search
by first few letters. Example: i want to open example.dat, old dos
style example*.* Reason for this is that import file doesn't have any
extension (from unix), which causes many problems.

Thanks
 
Try copying OrigFileName to CopyOfOrigFileName.txt
Then try importing Copy....txt into Excel - Import Wizard might kick-In...
 
I'm assuming you have multiple files in a directory and want to search for a
single file(?).

You could cycle through the directory checking each returned filename with
an Instr$ command viz;
If Instr$(ReturnedFileName,"your string") > 0 then Open/whatever..

--
Regards;
Rob

Please reply to the NG.
I'm already up to my eyeballs in
Nigerian/South African get rich
letters as well as "Microsoft Critical Updates" et al.
 
Back
Top