Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Location
    Singapore
    Posts
    28

    Question Unanswered: "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

  2. #2
    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...

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •