+ Reply to Thread
Results 1 to 3 of 3

Unable to create VBA coding for Text Box Click event

  1. #1
    Registered User
    Join Date
    08-04-2012
    Location
    Gloucester, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Unable to create VBA coding for Text Box Click event

    Hi All,

    I'm hoping someone will be able to assist me; I am having difficulty creating a MS Excel 2003 VBA Click Event for a text box to change the fill colour. There are twelve Text Box's grouped together pertaining to each month of the year and the idea is to alter the colour depending on a Red, Amber, Green Performance. The coding below works as a freeform click event however for a Text Box it returns a runtime error 70.
    Please Login or Register  to view this content.
    I have tried using Macro Recorder to find another method to no avail. However, below are the parameters for colour coding I wish to achieve.
    Please Login or Register  to view this content.
    Can anyone please help, I have tried different connotations and still struggling.
    Last edited by JosephP; 10-26-2012 at 07:40 AM. Reason: add code tags

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Unable to create VBA coding for Text Box Click event

    your first code snippet works for me in 2003. I reckon your issue may be related to the fact you have grouped the textboxes-does it work if you ungroup them?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    08-04-2012
    Location
    Gloucester, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Unable to create VBA coding for Text Box Click event

    JP,

    Apologies, I have just tried again using a new work sheet and a new text box and it works perfectly using the original snippet. It even works when grouped. Not sure what is causing the permission error so I shall have to restart the project.

    Many thanks

+ 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