+ Reply to Thread
Results 1 to 10 of 10

Need to add sheet in my 'SELECT RANGE' code

  1. #1
    Forum Contributor
    Join Date
    05-18-2011
    Location
    Delhi , India
    MS-Off Ver
    Excel 2007
    Posts
    171

    Need to add sheet in my 'SELECT RANGE' code

    In the following code i need to add the name of the sheet 'SHEET1' so that if i am on any other sheet , the code selects only sheet1 .

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Need to add sheet in my 'SELECT RANGE' code

    Put

    Please Login or Register  to view this content.
    before line
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Need to add sheet in my 'SELECT RANGE' code

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Need to add sheet in my 'SELECT RANGE' code

    Add this at the top?
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-15-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need to add sheet in my 'SELECT RANGE' code

    I'm not really sure what you want.
    This code will rename the sheet
    Please Login or Register  to view this content.
    Replace mySheet with the name of your sheet.

    If you are on a different sheet and want to run the macro on a sheet named "SHEET1", use this code
    Please Login or Register  to view this content.
    Alternatively, you can select the sheet by
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    05-18-2011
    Location
    Delhi , India
    MS-Off Ver
    Excel 2007
    Posts
    171

    Re: Need to add sheet in my 'SELECT RANGE' code

    i used the code

    Please Login or Register  to view this content.
    this code sends me back to sheet1. i want to keep working on another sheet while the macro keeps running on sheet1.

  7. #7
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Need to add sheet in my 'SELECT RANGE' code

    Quote Originally Posted by Sarangsood View Post
    i want to keep working on another sheet while the macro keeps running on sheet1.
    Well, then try the example by Andy Pope

  8. #8
    Forum Contributor
    Join Date
    05-18-2011
    Location
    Delhi , India
    MS-Off Ver
    Excel 2007
    Posts
    171

    Re: Need to add sheet in my 'SELECT RANGE' code

    yea that worked perfectly . also it freezes my sheet for that particular time when the macro of andy 'Speakcells' is running. can something be done about it ?
    thanks everyone

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Need to add sheet in my 'SELECT RANGE' code

    You can not use excel whilst code is running.

    What exactly are you trying to do? Perhaps a count down of some sort?

  10. #10
    Forum Contributor
    Join Date
    05-18-2011
    Location
    Delhi , India
    MS-Off Ver
    Excel 2007
    Posts
    171

    Re: Need to add sheet in my 'SELECT RANGE' code

    yes this is how the code looks now

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Code to select a range and set it as the print range onto one page
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2011, 03:37 PM
  2. Code to select range and open a user form is opening the wrong range
    By rrbest in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-05-2010, 12:34 PM
  3. [SOLVED] select Range Code
    By Soniya in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2005, 12:15 PM
  4. [SOLVED] Code to select range
    By Shawn in forum Excel General
    Replies: 1
    Last Post: 06-02-2005, 01:05 PM
  5. [SOLVED] VBA Code to Select Range
    By BethB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2005, 08:05 PM

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