+ Reply to Thread
Results 1 to 4 of 4

Sheet Activation

Hybrid View

  1. #1
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267

    Sheet Activation

    I have been building a program in Excel and one of my lines of code just stopped working. I am just selecting a different sheet, say I am Sheet1 and I want to jump to Sheet2:

    Sheets("Sheet2").Activate
    I have always used this in the past but it doesn't work anymore, it just stays on the first sheet. What am I doing wrong?

    Thanks guys.
    Last edited by wmorrison49; 10-27-2008 at 03:33 PM.

  2. #2
    Registered User
    Join Date
    10-20-2008
    Location
    India
    Posts
    8

    Worksheet

    you can use "worksheets" instead of sheet.

  3. #3
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    Didn't work. I have tried

    Sheets("Sheet2").Activate
    Sheets("Sheet2").Select
    Worksheets("Sheet2").Activate
    Worksheets("Sheet2").Select
    and nothing is working. I am trying to walkthrough the macro using F8 and it just skips over these lines like do nothing. I had these exact lines before and they worked just fine. What the heck is going on here? It's saying "Select method of range class failed."
    Last edited by wmorrison49; 10-27-2008 at 01:51 PM.

  4. #4
    Forum Contributor wmorrison49's Avatar
    Join Date
    09-25-2007
    Posts
    267
    It just started working again, even though I didn't change anything. Did I just fall victim to the sometimes work, sometimes don't nature of macros?

+ 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