+ Reply to Thread
Results 1 to 5 of 5

Tryin to Write macro to put X in cell when clicked and then clear other cell that had a X

  1. #1
    Registered User
    Join Date
    09-25-2015
    Location
    san antonio, tx
    MS-Off Ver
    2013
    Posts
    3

    Tryin to Write macro to put X in cell when clicked and then clear other cell that had a X

    Been trying to figure this out by myself but now I am just running in circles. The best I came up with Puts x in cell when clicked, and if more than 1 cell has X both are deleted. Ideally only oldest x would be deleted. Here is the best I got to work:
    Please Login or Register  to view this content.
    Last edited by alansidman; 09-25-2015 at 05:36 PM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Tryin to Write macro to put X in cell when clicked and then clear other cell that had

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    09-25-2015
    Location
    san antonio, tx
    MS-Off Ver
    2013
    Posts
    3

    Re: Tryin to Write macro to put X in cell when clicked and then clear other cell that had

    Cool, will do thanks

  4. #4
    Registered User
    Join Date
    09-25-2015
    Location
    san antonio, tx
    MS-Off Ver
    2013
    Posts
    3

    Re: Tryin to Write macro to put X in cell when clicked and then clear other cell that had

    Cool, will do thanks

  5. #5
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: Tryin to Write macro to put X in cell when clicked and then clear other cell that had

    To solve your problem, I've used cell "A1" to store the address of last cell visited.
    You can use any cell you watnt.

    Try this code:
    Please Login or Register  to view this content.
    Hope it does what you want to do
    Last edited by vichopalacios; 09-26-2015 at 07:09 PM.

+ 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] Load web image when cell holding URL is clicked/double-clicked
    By jchamber00 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2013, 09:13 PM
  2. [SOLVED] Run macro when a cell is activated (clicked)
    By Charmymay in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-09-2013, 11:47 AM
  3. [SOLVED] code so that when a cell is clicked, a tick mark goes in the cell that was clicked
    By behnam in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-08-2013, 01:17 PM
  4. Replies: 1
    Last Post: 06-21-2013, 04:05 AM
  5. Replies: 0
    Last Post: 11-06-2012, 11:16 AM
  6. [SOLVED] Run a macro when a cell is selected/clicked
    By denvernuggets15 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-24-2012, 05:58 AM
  7. Run a macro when a cell is clicked
    By souvick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2011, 01:50 PM
  8. Run macro when a cell is clicked
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2010, 08:33 AM

Tags for this Thread

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