+ Reply to Thread
Results 1 to 4 of 4

Set deactivating worksheet as variable in Worksheet_Deactivate event

  1. #1
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Question Set deactivating worksheet as variable in Worksheet_Deactivate event

    Dear all,
    I am using below code to set deactivating sheet as variable in "Aws" but it sets the sheet we switch to.
    I know its obvious.

    I wanted to know if there is any trick to use "Deactivating sheet" as variable..?
    I am keying-in this code in 'Sheet1(Sheet1)' excel objects and i am planning to use this code over hundred+ of sheets.


    Please Login or Register  to view this content.
    Please suggest.
    Thanks

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Set deactivating worksheet as variable in Worksheet_Deactivate event

    Maybe:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Set deactivating worksheet as variable in Worksheet_Deactivate event

    If you're going to use the same event in all your sheets, you would be better served to use a single Workbook level event in the ThisWorkbook module:
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Re: Set deactivating worksheet as variable in Worksheet_Deactivate event

    Thanks.. Works like charm...

+ 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] Combining worksheet custom (Name) Property with a variable to activate sheet
    By Jon F in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-28-2013, 03:11 PM
  2. Using the WorkSheet_Deactivate to autofilter and autofill cells
    By trishcollins in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-15-2012, 03:41 PM
  3. Worksheet_Deactivate procedure leaves me on the deactivated sheet
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-13-2008, 05:21 PM
  4. Reasons why Worksheet_Deactivate fails?
    By cormorant in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-22-2006, 03:50 AM
  5. Worksheet_deactivate fails - any ideas?
    By cormorant in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-17-2006, 08:58 AM
  6. [SOLVED] Worksheet_Deactivate() problem with deleting data
    By Karoo News in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-19-2005, 10:05 AM
  7. [SOLVED] Worksheet_Deactivate() problem with deleting data
    By Neil Atkinson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2005, 10:05 AM
  8. [SOLVED] Worksheet Change event code moved to Worksheet Calculate event... and it's not working
    By KimberlyC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-23-2005, 06: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