Another Excel oddity

S

Steve

Hi,

I hope everyone had a good New Year.

My Excel is really being strange at the moment. Amongst other things,
when I save a current project, the visible worksheet changes from what
I want to a different one in the workbook.
Can anyone tell me why this is, please?

Thanks

Steve
 
B

Bob Phillips

Steve,

Could there be some event code in the workbook that activates the specific
sheet?

Go into the VBE (Alt-F11), make sure the project explorer is up (Ctrl-R),
select your workbook, make sure it is fully expanded (+/- sign), make sure
the Microsoft Excel Objects is fully expanded (+/- sign) and click
THisWorkbook. Check if there is code there.


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
S

Steve

Thanks for replying, Bob.

I'd already thought to look at that, and no, there's nothing there.
(There was, but it was an empty Worksheet_Open() event, which I've now
removed)

Steve
 
D

Dave Peterson

If you open the workbook with macros disabled (change the security setting
before you open the workbook), do you still get the same thing?

If no, then maybe you missed some code.

If I recall correctly, xl's autosave also changes to the first worksheet in the
workbook when it saves--any chance you're saving through autosave?
 
S

Steve

Hey, that did it. I opened with the macros disabled, and then saved the
document. Works like a charm.

Thanks a lot.

Steve
 
D

Dave Peterson

If xl behaved nicely with macros disabled, I'd still guess you have a macro
doing some stuff.

You may want to look for that code once more.
 
Top