file import

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
 
J

JMay

Try copying OrigFileName to CopyOfOrigFileName.txt
Then try importing Copy....txt into Excel - Import Wizard might kick-In...
 
R

RobNew

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.
 

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