code not running on one computer

hhendrix

New Member
Joined
Mar 3, 2015
Messages
3
On this computer I have Office 2007 and windows 7. Other computers have the same system. Some have vista, windows 8, windows 8.1 along with the same office 2007.

I have the same rather large excel 2007 spreadsheet on every one of these computers. They all run it great, except the this one.
I get the following error when loading the spreadsheet: Visual Basic Runtime Error # 32809. The code it refers to is:

Private Sub Workbook_Open()
Worksheets("Client").Activate
Application.WindowState = xlMaximized
End Sub

When I cancel the error, the code seems to run properly. i.e. the Client worksheet is the active sheet and the window is maximized. As I said, I only have this problem on this machine (Toshiba laptop, with windows 7 and office 2007)

I believe I have properly updated visual basic on this machine - but it acts like I might have not...

What is causing the error to run on this machine only? How can I stop it?

Thanks
Hank
 

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,286
Office Version
2019, 2016, 2013
Platform
Windows
on error resume next as the first line of the sub, if the sheet client is already activated then it might throw and error trying to do something thats already done

one thought is it run by a different user, and do you have a routine to select the sheet when shutting down. If users close files in an unexpected way that could create a potential issue
 
Last edited:

hhendrix

New Member
Joined
Mar 3, 2015
Messages
3
As I said, it works perfect on every computer I own, except this one laptop. I have not encountered any problem opening or shutting down the file on any of the other 5 machines.

Thanks,
 

Watch MrExcel Video

Forum statistics

Threads
1,095,541
Messages
5,445,090
Members
405,316
Latest member
joaoamaro

This Week's Hot Topics

Top