If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > "This file is not in a recognise format" when Opening Text File

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-10-04, 22:20
oks oks is offline
Registered User
 
Join Date: Jun 2004
Location: Singapore
Posts: 28
Question "This file is not in a recognise format" when Opening Text File

Hi,

I'm trying to open a fixed width text file in excel using macro, but before opening the file there is always a "This file is not in a recognise format" msg. How can I disable this msgbox from popping out?

Please help!

Thanks & Regards,
oks
Reply With Quote
  #2 (permalink)  
Old 06-22-04, 08:15
robojam robojam is offline
Registered User
 
Join Date: Feb 2004
Location: Charlotte, NC
Posts: 79
Rather than disable the message, wouldn't it be better to put an error handler in there as a wrong format is being flagged?
__________________
Make something idiot proof and someone will make a better idiot...
Reply With Quote
  #3 (permalink)  
Old 06-22-04, 10:33
DavidCoutts DavidCoutts is offline
Registered User
 
Join Date: Jan 2004
Location: Aberdeen, Scotland
Posts: 1,067
Hi

All you need to do is before you open the file use the line

Application.DisplayAlerts = False

This restricts all pop up messages
Once you have passed this point you should set

Application.DisplayAlerts = True

HTH
David
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On