+ Reply to Thread
Results 1 to 3 of 3

Move to another sheet before running macros

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Office 365
    Posts
    71

    Move to another sheet before running macros

    Hello All!

    I have a little problem I hope you can help with. I have a button running the following macros and VBA code:
    Please Login or Register  to view this content.
    Both of the macros and the code are running in the sheet I am within. However, now I need to move the button and therefore the code is no longer executable. The easiest thing to solve it I think is to tell the Callmacros to go to a chosen sheet, call the macros and then return to the sheet within before. But how can I do this? Google didn't help

    Thank you,


    GregersDK

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Move to another sheet before running macros

    Hello gregersdk,

    We would need to see what the other Macros look like, and also confirm of the sheet/s you want to switch to is of the same format as the original. Maybe it would be a good idea if you could attach a sample workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    11-07-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Office 365
    Posts
    71

    Re: Move to another sheet before running macros

    Sorry for my late reply, busy at work with other tasks at the moment. Are you ready for quite a lot of code?
    I solved it myself (as simple at Sheets("").Select) for some of the macros involved, but this is the one I cannot find the solution for. I presume something is wrong with using the ActiveSheet, but I have no idea how to solve it.

    Please Login or Register  to view this content.
    I am not comfortable with giving you the workbook, sorry. The format should be the same between. The problem is when I push the button to run the macro, it does not work unless the button is placed on the same sheet as the data.

    Hope You can help,


    GregersDK
    Last edited by gregersdk; 12-08-2014 at 04:57 AM. Reason: Made it sound like I had solved it, bad wording

+ 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. [SOLVED] Macros To Move Multiple Rows To Another Sheet And Macro To Move Single Rows To DAX Table
    By jcaynes in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-22-2013, 05:08 PM
  2. [SOLVED] Need help in creating Macros to move a cell value into new sheet
    By karthisiva in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-16-2013, 10:51 PM
  3. [SOLVED] problems running macros on more than one sheet in a workbook
    By bite_tony in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-15-2013, 12:02 PM
  4. How to preventing running Macros on a protected sheet :)
    By 123wc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2011, 03:25 PM
  5. Excel 2007 : Running macros on a protected sheet
    By Ateyu in forum Excel General
    Replies: 2
    Last Post: 03-15-2010, 05:08 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