+ Reply to Thread
Results 1 to 4 of 4

Error When Selecting Sheet then Selecting Range

  1. #1
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Question Error When Selecting Sheet then Selecting Range

    Hi Guys,

    Im getting an error when I try to select a range on a sheet i've just selected
    the code below shows where this is happening.

    Please Login or Register  to view this content.
    For all sheets who's name does not equal Welcome, Data or Print
    Select that worksheet
    select range on worksheet
    run macro HideCrews

    Is this happening because ws isnt assigned as the worksheet name?
    if so how would I assign ws = worksheet.name

    Please Login or Register  to view this content.
    Thanks in advance

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Error When Selecting Sheet then Selecting Range

    Try this...

    Please Login or Register  to view this content.
    Or better yet...
    Please Login or Register  to view this content.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Error When Selecting Sheet then Selecting Range

    You shouldn't need to select anyway if the code in the other macro is written correctly

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Error When Selecting Sheet then Selecting Range

    or
    Please Login or Register  to view this content.
    But it shouldn't be necessary if the macro 'Hidecrews' is selection independent.



+ 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