Excel Excel Macro Help

Joined
Jun 9, 2009
Messages
1
Reaction score
0
Hello All,

I am using Access 97 to generate a database. After entering data into forms in Access, the user then clicks a button which opens a report in excel. I have created a macro in excel which should automatically maximize the worksheet in excel. This macro also changes the active worksheet to "sheet2". The part of the macro which changes the active worksheet is working fine when I load the report through access, but not the part of the macro associated with the maximization of the window. Both parts of the macro work if I open excel on its own (ie: not through access). Below is my code:

Sub auto_open()

Worksheets("Sheet2").Activate
ActiveWindow.WindowState = xlMaximized

End Sub


Any suggestions?

Thanks in advance for your help.

engineer_in_training
 

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