The file format and extension don't match. Vba

Cervani

New Member
Joined
Jun 22, 2022
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Hi guys,

I have vba opening latest Excel attachment from outlook. All works fine, but, I have some new report sent in 97-2003 xls format.
And simply this vba does not see it.

Only thing I can think of is this message once I open it on desktop :

The file format and extension don't match. The file could be corrupted or unsafe....do you want open it anyway.


I did open it and after Save As - default format seem to be Unicode Text (*.txt)

I did add txt to my code but it doesn't work

Anyone could advise please?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Just to add that I tested files with 97-2003 xls type on my email box and they are recognised. Just this one is tricky.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top