Disable/ignore compatibility check during SaveAs

O

omnicrondelicious

Hi all,

Got a problem that's driving me crazy... I'm using Excel 2007 and the
compatibility check for backwards-compatability when saving as .xls is
interrupting my automated report generator. We've got a bunch of
report templates that I've set up that loop through an input list,
populate the template based on the query results, and then do a SaveAs
(or ExportAs) based on a file type extension in a certain cell. So it
works great for pdf, csv, and xlsx files.

However, if I try and do it with xls files, the compatibility check
prompt pops up and requires user intervention, thus defeating the
point of the loop*. Because the loop renames the workbook for each
report iteration, unchecking the "Check this workbook for
compatibility each time" doesn't do anything.

So is there any way using VBA to disable/ignore/automatically say
'continue' to the compatibility check?

thanks,
..o.


* The point being to allow me to walk away from the computer, get some
coffee, read the paper, take a nap, and eventually wake up with all my
reports automagically finished and everyone thinking I'm working
really hard because they still believe I'm producing hundreds of
reports the old manual way and I haven't yet disabused them of that
notion. Oh, alright - I'll probably just tell them I automated it and
do other work in my now freed-up time, but it sure sounds tempting to
not tell them, huh?
 
O

omnicrondelicious

Wow. I don't think I've ever stumped Usenet before. No worries, I
figured it out. The solution was embarrassingly simple, natch:

Application.DisplayAlerts = False
With NewWkbk
.SaveAs Filename:=SavePath, FileFormat:=-4143, CreateBackup:=False
.Close SaveChanges:=False
End With
Application.DisplayAlerts = True

Got all fixated on the CheckCompatibility property that I just forgot
about good ol' DisplayAlerts...

..o.
 
E

Edgar Estrada

Thank you so much for this post.



omnicrondeliciou wrote:

Disable/ignore compatibility check during SaveAs
25-Oct-07

Hi all

Got a problem that's driving me crazy... I'm using Excel 2007 and th
compatibility check for backwards-compatability when saving as .xls i
interrupting my automated report generator. We've got a bunch o
report templates that I've set up that loop through an input list
populate the template based on the query results, and then do a SaveA
(or ExportAs) based on a file type extension in a certain cell. So i
works great for pdf, csv, and xlsx files

However, if I try and do it with xls files, the compatibility chec
prompt pops up and requires user intervention, thus defeating th
point of the loop*. Because the loop renames the workbook for eac
report iteration, unchecking the "Check this workbook fo
compatibility each time" doesn't do anything

So is there any way using VBA to disable/ignore/automatically sa
'continue' to the compatibility check

thanks
..o

* The point being to allow me to walk away from the computer, get som
coffee, read the paper, take a nap, and eventually wake up with all m
reports automagically finished and everyone thinking I'm workin
really hard because they still believe I'm producing hundreds o
reports the old manual way and I haven't yet disabused them of tha
notion. Oh, alright - I'll probably just tell them I automated it an
do other work in my now freed-up time, but it sure sounds tempting t
not tell them, huh?

Previous Posts In This Thread:

Disable/ignore compatibility check during SaveAs
Hi all

Got a problem that's driving me crazy... I'm using Excel 2007 and th
compatibility check for backwards-compatability when saving as .xls i
interrupting my automated report generator. We've got a bunch o
report templates that I've set up that loop through an input list
populate the template based on the query results, and then do a SaveA
(or ExportAs) based on a file type extension in a certain cell. So i
works great for pdf, csv, and xlsx files

However, if I try and do it with xls files, the compatibility chec
prompt pops up and requires user intervention, thus defeating th
point of the loop*. Because the loop renames the workbook for eac
report iteration, unchecking the "Check this workbook fo
compatibility each time" doesn't do anything

So is there any way using VBA to disable/ignore/automatically sa
'continue' to the compatibility check

thanks
..o

* The point being to allow me to walk away from the computer, get som
coffee, read the paper, take a nap, and eventually wake up with all m
reports automagically finished and everyone thinking I'm workin
really hard because they still believe I'm producing hundreds o
reports the old manual way and I haven't yet disabused them of tha
notion. Oh, alright - I'll probably just tell them I automated it an
do other work in my now freed-up time, but it sure sounds tempting t
not tell them, huh?

Wow. I don't think I've ever stumped Usenet before.
Wow. I don't think I've ever stumped Usenet before. No worries,
figured it out. The solution was embarrassingly simple, natch

Application.DisplayAlerts = Fals
With NewWkb
.SaveAs Filename:=SavePath, FileFormat:=-4143, CreateBackup:=Fals
.Close SaveChanges:=Fals
End Wit
Application.DisplayAlerts = Tru

Got all fixated on the CheckCompatibility property that I just forgo
about good ol' DisplayAlerts..

..o.


Submitted via EggHeadCafe - Software Developer Portal of Choice
Review: Improving .NET Application Performance
http://www.eggheadcafe.com/tutorial...be8-33c02aac8b91/review-improving-net-ap.aspx
 

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