Results 1 to 3 of 3

On click output & clear

Threaded View

  1. #1
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2003
    Posts
    2

    On click output & clear

    Hi, today is my first day trying to use macros/VBA. I want to create a really simple (I hope) macro that goes something like this:

    In Sheet1 I have inserted a rectangle shape. I have then assigned a macro as such;

    Sub theexample()
    Range("G11").Value = "The Example"
    End Sub
    I have then inserted another rectangle shape in Sheet1. I have assigned a macro to that as such;

    Sub theexample2()
    Range("G11").ClearContents
    End Sub
    What I want to be able to do is have only one rectangle shape so that when I click it, G11 says "The Example" and then when I click it again, G11 is cleared. By extension, once it is cleared, if I were to click it again, it would then again say "The Example" again, and so on and so on. I have been trying to google this but have come up with nothing so far, except the two separate shapes as described above. Can anyone help please? Thanks (and apologies if this is quite trivial).
    Last edited by Fotis1991; 08-29-2014 at 07:53 AM. Reason: Pls use code tags around your codes!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. clear text field on click
    By Caroline88 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-30-2013, 02:59 PM
  2. Replies: 2
    Last Post: 06-10-2013, 09:41 AM
  3. click plot output value
    By healing in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-09-2013, 09:38 PM
  4. Can't get command buttons to run sub and clear output contents
    By BGiffin2004 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-20-2011, 10:41 PM
  5. Clear cells depending on data validation list output
    By fergcu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-07-2008, 05:11 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