+ Reply to Thread
Results 1 to 3 of 3

Pass sheet name to Sub

  1. #1
    Registered User
    Join Date
    01-29-2013
    Location
    texas
    MS-Off Ver
    Excel 2010
    Posts
    68

    Pass sheet name to Sub

    I have a Sub to sort sheets by due date (D:D)

    As each sheet is selected the sheetcode activate calls the sort routine.
    This works
    Please Login or Register  to view this content.
    if manually plug in the sheet name

    This doesn't
    Please Login or Register  to view this content.
    Called with
    Please Login or Register  to view this content.
    The immediate window does show ws1 = "April"

    Also how do you turn off the highlight after the range selection?

    Please point out my ignorance.
    thanks

  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: Pass sheet name to Sub

    It should just be ws1 not Sheets(ws1)
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-29-2013
    Location
    texas
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Pass sheet name to Sub

    Thanks Norie - I do feel dumb.

+ 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