Link to home
Start Free TrialLog in
Avatar of Vincent Costanza
Vincent CostanzaFlag 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?
Avatar of Dave
Dave
Flag of Australia image

I'm presuming that this message comes up during a macro? If so can you pls post your code
Cheers
Dave
Avatar of 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
Avatar of Dave
Dave
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect!! Thanks...
No probs :)