+ Reply to Thread
Results 1 to 3 of 3

Adjust a code from cell range trigger to button trigger

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    southampton
    MS-Off Ver
    Excel 2003
    Posts
    76

    Adjust a code from cell range trigger to button trigger

    Hi all,

    I have the code below that is two separate activities and I want to change the second activity from a cell trigger (Set KeyCells = Range("K42:AD42")) to a button trigger. I need to first to remain unchanged.

    I'd be ok if this was just one macro that I could assign to a button but because its two and I need to write the second's to clicking a button I'm over my head.

    Its occured to me while writing this that because it'll be a range of buttons I'll probably need to make each one an individual code? Is this the case? If so I may have to just keep this as it is

    Any advice would be appreciated!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Adjust a code from cell range trigger to button trigger

    Hi ld2x07,

    The following should work with a Command Button and only this one routine.
    The User has to select a cell in the range before clicking on the command button.
    This routine should go in an ordinary code module such as 'Module1'.

    Changes in red.
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Registered User
    Join Date
    05-14-2013
    Location
    southampton
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Adjust a code from cell range trigger to button trigger

    Hi Lewis,

    Many thanks for your help. Its an interesting approach and pretty neat

    Thanks
    Leo

+ 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. Replies: 0
    Last Post: 06-25-2014, 07:56 PM
  2. Allow code to run once then not until it's trigger value appears again
    By ozhunter in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-18-2013, 08:04 AM
  3. Trigger webpages button via vba
    By Lloyd Blankfein in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-22-2012, 05:54 AM
  4. Can't get command button click to trigger cell population
    By clcs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-25-2010, 01:43 AM
  5. Replies: 3
    Last Post: 11-15-2010, 01:53 AM

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