Defined Names response

L

LA-Alc

Hi all,

Have a macro that takes a .xlsm file and then saves it back to a '97-2003
..xls file. During the save, the following message shows:

"Defined names or formulas in this workbook may display different values
when they are recalculated in an earlier version of Excel if they:

- Reference cells outside of the row and column limit in an earlier version
of Excel
- Include functions that are not supported...
- Use formula limits that are not supported in ....

Do you want to recalculate all formulas when this workbook is opened?"

What code can I put into the macro to automatically answer 'Yes' to this, or
bypass it completely?

Thanks for any assistance.
 
B

Bob Phillips

Haven't tried it myself, but try

Application.DisplayALerts = False

before the save and reset afterwards.
 
L

LA-Alc

Hi Bob,

Thanks for the check. The code that I'm using is:

ActiveWorkbook.SaveAs Filename:= _
NewPO_No _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = False

When I run this, the message still comes up. Doing a bit of searching I'm
not sure if I should be addressing the ConflictResolution parameter of the
save? Yours works, so maybe it's more my code than anything else.

Thanks again.
 
B

Bob Phillips

Hopefully, final posting with the correct info

Application.DisplayAlerts = False

ActiveWorkbook.SaveAs Filename:= _
NewPO_No _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Application.DisplayAlerts = True

That is how it should be.
 

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