View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
LarryP LarryP is offline
external usenet poster
 
Posts: 73
Default Excel Equivalent of Access "Load" Event?

I have a workbook with a couple charts that for some reason "shrink" each
time the file is saved -- some kind of 2007 vs. 2003 problem. To solve it I
just wrote a wee macro that resizes the chart to the original, desired
dimensions. I attached it to the worksheet's Activate event, which works
fine once the workbook is open and you move to that worksheet from some other
worksheet. But it DOESN'T run when the workbook first opens; if that
worksheet is the first one to appear, it has the shrunken chart, and I have
to switch to a different worksheet and then back to that one in order to kick
off the macro.

In Access, where I do most of my work, I would use the form's Load or Open
event, but if there's a comparable Worksheet event in Excel I haven't found
it. Anyone know how I can make my macro run as soon as that sheet opens? (I
thought about the run-on-startup idea, but the worksheet in question may or
may not be the first one to appear when the file is first opened, and if it
isn't, the macro would presumably fail with a "Chart? What chart?" error.)