Results 1 to 5 of 5

code not running on one computer

This is a discussion on code not running on one computer within the Excel Questions forums, part of the Question Forums category; On this computer I have Office 2007 and windows 7. Other computers have the same system. Some have vista, windows ...

  1. #1
    New Member
    Join Date
    Mar 2015
    Posts
    3

    Default code not running on one computer

    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

  2. #2
    Moderator mole999's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    7,958

    Default Re: code not running on one computer

    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 by mole999; Mar 3rd, 2015 at 11:49 AM.
    • Yes I know there are better ways to do it. I just wish I knew them. - 2003, 2007, 2010, 2013 & 2016
    • I wear my ignorance openly, excel is not my chosen career, its a means to an ends
    • Posting Guidelines Want to post well laid out questions and answers Translate Excel Versions
      Code:
      [CODE ]Put Your Code[/ CODE]
    • Settings > General Settings (on the left) scroll to the bottom, > Miscellaneous Options > Use ENHANCED
    • X-Posting Guidelines Rule 13 > CHART STUFF

  3. #3
    New Member
    Join Date
    Mar 2015
    Posts
    3

    Default Re: code not running on one computer

    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,

  4. #4
    New Member
    Join Date
    Mar 2015
    Posts
    3

    Default Re: code not running on one computer

    Still no answer that works. Help anyone?

  5. #5
    shg
    shg is offline
    MrExcel MVP shg's Avatar
    Join Date
    May 2008
    Location
    The Great State of Texas
    Posts
    19,153

    Default Re: code not running on one computer

    Got ActiveX controls on a sheet? See Office Update breaks ActiveX controls | Excel Matters

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com