Macro Compatibility

M

M.Vance

I have a macro created in Excel 97/Windows 98. The macro
formats a document (font, size, margins, etc.) then allows
for a save as a .pdf. We have recently upgraded to Excel
2002/Windows XP and now the macro will not run.
The error it gives says the font is not compatible.
Courier New is the font.
Rumor is that macros created in older versions will not
run on 2002 with XP.
Does anyone know anything about this?
 
T

Tom Ogilvy

I don't have xl2002 handy, but the Font part of your code works OK in xl2000
as well. Excel 2002 added finer granularity in controlling what is allowed
when a sheet is protected. Perhaps, unless specifically allowed, changing
the font is no longer allowed. Did you try doing it manually with the sheet
protected?

I suspect this has more to do with a change in the way Excel itself operates
than anything to do with macro differences.

Move you Protect line of code below the formatting instructions and you
should be good to go if the sheet isn't already protected.
 

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