+ Reply to Thread
Results 1 to 4 of 4

Runtime error 1004 Activate Method of Worksheet Class Failed - Using Worksheets().Activate

  1. #1
    Registered User
    Join Date
    11-24-2008
    Location
    ohio
    Posts
    19

    Runtime error 1004 Activate Method of Worksheet Class Failed - Using Worksheets().Activate

    I have a weird problem that only shows up on one machine (go figure)..... When I open the excel file I run a subroutine to do a couple of things: 1) Display a message (text in a cell of a worksheet) 2) and unhide all the worksheets by calling the ShowAllSheets sub routine. I do this so if Macro's are not enabled all you see is the welcome sheet that says "Enable macros"

    My code works great on all machines I've tried it on but one. On one machine I get the following error "Runtime error 1004 Activate method of worksheet class failed". The runtime error is associated with this line of code "ActiveWorkbook.Sheets(AdminWorksheet).Activate" Like I said everything works fine except on this one machine. Any ideas would be greatly appreciated?

    The code this pertains to is below:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Runtime error 1004 Activate Method of Worksheet Class Failed - Using Worksheets().Acti

    If you change that line to this what happens.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-24-2008
    Location
    ohio
    Posts
    19

    Re: Runtime error 1004 Activate Method of Worksheet Class Failed - Using Worksheets().Acti

    I will change it and send it to him to check it out on the machine that has the error. I'll have to wait on him though. Do you have an idea why the .Activate would cause an error?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Runtime error 1004 Activate Method of Worksheet Class Failed - Using Worksheets().Acti

    I don't know, and I don't know if what I suggested will work.

    Using Application.Goto can sometimes be preferable to Activate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1