+ Reply to Thread
Results 1 to 5 of 5

Combine two macros and run them on double clicking a cell

  1. #1
    Registered User
    Join Date
    03-14-2009
    Location
    kerala, india
    MS-Off Ver
    Excel 2003
    Posts
    20

    Combine two macros and run them on double clicking a cell

    I have two pieces of code. The first one puts a tick mark in the cell when you double click it. The second one hides column B of another sheet if the value in cell A1 of Sheet1 is "a". I want to combine these two codes so that when I double click cell A1 of sheet1 it puts a tick mark in the cell and hides column B of Sheet2 and clears the contents of range B2:B50 of Sheet2. Please help me.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by VBA Noob; 03-20-2009 at 03:14 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Combine two macros and run them on double clicking a cell

    Hi,

    Just before the second End If in the Before_DoubleClick procedure add the instruction

    Please Login or Register  to view this content.
    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Combine two macros and run them on double clicking a cell

    Maybe like this:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    03-14-2009
    Location
    kerala, india
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Combine two macros and run them on double clicking a cell

    Thanks Richard and shg.
    Both the code pieces work fine. Thanks a lot for quick help.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Combine two macros and run them on double clicking a cell

    You’re welcome. Would you please mark the thread as Solved?

    Click the Edit button on your first post in the thread

    Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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