+ Reply to Thread
Results 1 to 6 of 6

Instead of Active sheet how can I use specific sheet?

  1. #1
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Azerbaijan
    MS-Off Ver
    Excel 2016
    Posts
    145

    Instead of Active sheet how can I use specific sheet?

    Hello Dear community,

    I used Macro recorder to select range and replace specific character.

    Please Login or Register  to view this content.
    But how can I change range, so when I run this VBA from another sheet it will still work. Because right now when I run this macro from different sheet, it pop-ups non-stop.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Instead of Active sheet how can I use specific sheet?

    Append your worksheet reference to your range method. For example,

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Instead of Active sheet how can I use specific sheet?

    You can make it a little cleaner and run a bit faster if you change it to this:

    Please Login or Register  to view this content.
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

  4. #4
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Azerbaijan
    MS-Off Ver
    Excel 2016
    Posts
    145

    Re: Instead of Active sheet how can I use specific sheet?

    Both solutions works, thank you

  5. #5
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Azerbaijan
    MS-Off Ver
    Excel 2016
    Posts
    145

    Re: Instead of Active sheet how can I use specific sheet?

    There was problem with this code. I can't understand why.

    I get error "Run time error "1004" : Appilcation defined or object-defined error.


    Can any one tell me what is problem?

    Please Login or Register  to view this content.
    Note: DATA-MOBILIZ is hidden sheet.

  6. #6
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Instead of Active sheet how can I use specific sheet?

    Not sure why, but i copied your macro into a new spreadsheet and it ran fine, i named the sheets like yours and added some values in E and it found and replaced the -

    No error

+ 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. make a sort by active sheet, not specific sheet
    By tsiguy96 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2014, 11:25 AM
  2. Replies: 6
    Last Post: 10-29-2014, 06:00 AM
  3. Replies: 1
    Last Post: 01-04-2014, 06:37 PM
  4. Copy the data in any active row in Sheet 1 to specific cells in Sheet 6
    By cti4sw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2013, 02:43 PM
  5. [SOLVED] How to get (range)macro to always run code on a specific sheet regardless of active sheet?
    By JTwrk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-18-2012, 04:33 PM
  6. Active Sheet vs Specific sheet
    By dalewms2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2011, 03:33 PM
  7. Copy from active sheet and paste into new sheet using info from cell in active
    By Ingve in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2006, 06:00 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