+ Reply to Thread
Results 1 to 3 of 3

HELP - run macro from any worksheet

  1. #1
    Registered User
    Join Date
    05-24-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    35

    Question HELP - run macro from any worksheet

    Hi

    I have the following code and it works when I run it from a worksheet entitled "Full List". However I want to run it from another worksheet call "Active List" (completely unrelated worksheet but this is where I want to run all my macros from), but it comes back with a 'Run Time Error 1004 'Application Defined or Object Defined Error'.

    Can someone help point out what I am doing wrong please? I cannot seem to spot it as I am sure there is something simple I need to change.


    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: HELP - run macro from any worksheet

    On which line do you get the Debug error?

    I think you'll need to upload the workbook so that we can see the request in context
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-24-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    35

    Re: HELP - run macro from any worksheet

    Hi

    thanks for your reply. The error is associated with the following line:

    Please Login or Register  to view this content.
    I have attached an example of my issue. You will notice 4 visible tabs.

    If you press the "Run All Macros" button on the first tab entitled "Full List" you will note the error coming up. However if you turn to tab entitled "Active List" where I have that specific code only (and it relates to that tab), it works fine.

    The question I have is how do I modify the code so it runs from the first tab entitled "Full List".

    The overall objective is to extract data based on specific headings (in this case numbers) into different tabs using one macro. It works, but is having issues when I change the tab it is run from.

    Hope you can help

+ 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. Macro to copy data from multiple worksheet cells in to a single Master worksheet
    By thunt13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2015, 03:24 PM
  2. [SOLVED] Macro/VBA code to Copy data from primary worksheet to a worksheet opened by macro
    By MHamid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-30-2013, 11:10 AM
  3. Macro to select worksheet based on cell value and then return data to diff worksheet
    By clnossok in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2013, 07:48 PM
  4. Excel 2010 Macro to copy worksheet, update formula and rename worksheet
    By madmak0203 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:18 PM
  5. Replies: 1
    Last Post: 08-29-2012, 07:11 PM

Tags for this Thread

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