Macro Error
Posted by Galto on January 14, 2002 6:20 AM
Hi,
I export data from a Crystal Report into Excel, and I need to do a little re-formatting before it's sent on to someone else. When the exported file is opened, however, the default page format is adjusted to 10% of the normal size (sometimes only 1% !). I'm pretty much resigned to the fact that I can't change this, so I'm attempting to use a macro to clean it up quickly.
The goal is to re-format the report so it fits into 1x1 pages and is oriented as landscape. I can do these steps manually, but I have several other re-formatting steps to perform as well (deleting extra columns and rows, changing fonts, etc.).
I'm not much into VB programming, so I'm just recording clicks and keystrokes to create the macro. The columns, rows, and font formatting goes OK, but I always end up with an error message similar to this one when it hits the pont of attemptng to change the page format:
====================
"Run Time Error 1004:
Unable to set the LeftHeader Property of the PageSetup Class"
====================
I've tried testing a Macro ONLY with the page format lines, and the same error comes up, so I know that's where it's failing.
Any ideas? Thanks!
Galto