Results 1 to 33 of 33

A worksheet is unexpectedly activated

Threaded View

  1. #1
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,854

    A worksheet is unexpectedly activated

    I have a macro assigned to a button that runs perfectly on the data in the active sheet and in other sheets as well using Excel 2010. However, when I try to run it using Excel 2013 or Excel 2016, a different sheet is unexpectedly activated so the macro generates an error. There is nothing in the code that activates this other sheet and, to be safe, the macro disables events, even though there is nothing in the event code that even references to this other sheet. I have tried assigning the active sheet name to a variable at the beginning of the macro and the using that variable to activate the sheet even though it is already the active sheet, but the other sheet is still activated. I was wondering if anyone else has experienced this problem. I was hoping to get some feedback on what could possibly cause this to happen. As I already mentioned, it runs without errors using Excel 2010. My suspicion is that there is a glitch in the 2013 and 2016 versions of Excel. I haven't posted the code because it is quite long and part of a large project that calculates the final results of a cross country meet. If anyone has any suggestions or would like the code to be posted, I can certainly do that. Many thanks in advance.

    Also posted at: https://www.mrexcel.com/board/forums...10/post-thread
    Last edited by Mumps1; 10-13-2022 at 11:47 AM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Data on Worksheet is not being refreshed when Worksheet is activated
    By slbrick in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-17-2019, 10:56 AM
  2. [SOLVED] How to lock cells with value once the worksheet is activated of opened
    By oct2mine in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-24-2015, 03:28 AM
  3. Macro to refresh another worksheet when tab is activated
    By juliettelam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2014, 12:28 PM
  4. [SOLVED] Worksheet Activate does not run when sheet activated using VBA
    By solnajeff in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-03-2014, 05:40 PM
  5. [SOLVED] Worksheet_Activate () - Need to work when any worksheet is activated
    By Jim McEwan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2013, 10:02 PM
  6. Form with activated worksheet
    By jovir in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2013, 07:52 AM
  7. Run a macro when a Worksheet is clicked/activated
    By Warren McGoldrick in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2005, 06:06 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