Avatar of Vincent Costanza
Vincent Costanza
Flag for United States of America asked on

Disable Compatability check in Macro

How do I stop the compatability check when doing a save.as to .xls file type in excel 2007?
Microsoft ApplicationsMicrosoft Excel

Avatar of undefined
Last Comment
Dave

8/22/2022 - Mon
Dave

I'm presuming that this message comes up during a macro? If so can you pls post your code
Cheers
Dave
Vincent Costanza

ASKER
Yes it does... It comes up twice... I save the file three time in this macro..
first as a xls, second it saves the current sheet as csv, and finally is saves again as a xls. The user has to clear three compatability warnings even if unchecked in Excel Options

Sub CreateTierPricing()
 
 
    ActiveWorkbook.SaveAs Filename:="Z:\EXCEL\PriceList\ASMPL" & Format(Date, "mm-dd-yy") & Format(Time, "hhmm") & " .xls", FileFormat:= _
        xlExcel8, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
        , CreateBackup:=False
 
    ActiveWorkbook.SaveAs Filename:="\\Swsvr\shiloh\IMPORTS\TierP\" & "Tier_Pricing.csv" _
    , FileFormat:=xlCSV, CreateBackup:=False
    
    
MsgBox ThisWorkbook.Path & "\" & ThisWorkbook.Name
    ActiveWorkbook.SaveAs Filename:="Z:\EXCEL\PriceList\ASMPL" & Format(Date, "mm-dd-yy") & Format(Time, "hhmmss") & " .xls", FileFormat:= _
        xlExcel8, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
        , CreateBackup:=True
        
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Dave

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Vincent Costanza

ASKER
Perfect!! Thanks...
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Dave

No probs :)