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
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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:
Upvote 0
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,
 
Upvote 0

Forum statistics

Threads
1,212,927
Messages
6,110,697
Members
448,293
Latest member
jin kazuya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top