+ Reply to Thread
Results 1 to 5 of 5

This Workbook Sheet Change Selection

  1. #1
    Registered User
    Join Date
    01-24-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    60

    This Workbook Sheet Change Selection

    Hi folks,

    I'm trying to write a this workbook code that applies to all sheets.

    If cell A4 is selected show the shape Note
    Else dont show it

    This is what I have below



    Please Login or Register  to view this content.
    its not working, any ideas

    thanks

    sl

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: This Workbook Sheet Change Selection

    Try:
    Please Login or Register  to view this content.
    Note that I've used the Workbook_SheetSelectionChange event, not the Workbook_SheetChange event
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    01-24-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    60

    Re: This Workbook Sheet Change Selection

    Hi Olly,

    brilliant - much more easier in 1 line than my if else.

    if in case I wanted to skip a sheet would I do
    if sh.name ="Menu" then
    skip

    sl

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: This Workbook Sheet Change Selection

    Change to:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-24-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    60

    Re: This Workbook Sheet Change Selection

    thank you Olly,

    did the job perfectly

    Save me having to paste my old code into 30 worksheets

    Have a great day!
    sl

+ 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] exec macro on sheet selection change
    By brainzlp in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-01-2016, 08:17 AM
  2. VBA to Change All Links Within a Workbook Based on Drop Down Selection
    By davidiain91 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2015, 06:29 PM
  3. Replies: 3
    Last Post: 01-03-2014, 06:39 PM
  4. Change/Shift to another sheet based on user selection in this sheet
    By kittu55 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-18-2013, 08:43 PM
  5. Sub to detect any change in cell selection within any open workbook?
    By Nickster64 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-03-2008, 06:38 PM
  6. Replies: 0
    Last Post: 07-17-2008, 01:19 PM
  7. move selection from a sheet to new workbook
    By nickm687 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2007, 12:26 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