+ Reply to Thread
Results 1 to 7 of 7

assigning code to buttons

  1. #1
    Registered User
    Join Date
    08-26-2010
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    11

    assigning code to buttons

    --------------------------------------------------------------------------------

    I have two buttons on my sheet.
    I just created text boxes.... one has the text yellow4 and then other one green3.
    I want this assigned to yellow4.

    Please Login or Register  to view this content.
    and this assigned to green3

    Please Login or Register  to view this content.
    how do I put those together so that the right code goes to the right text box.
    Last edited by crazyhick; 08-28-2010 at 07:37 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: assigning code to buttons

    You've asked virtually the same question already here. I've posted code that you haven't even acknowledged.

    Also here. I think you need to read the Forum Rules properly

    I don't see how this code will put anything in textboxes, you are working with cells
    Last edited by royUK; 08-28-2010 at 07:20 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    05-09-2009
    Location
    Manchester,England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    58

    Re: assigning code to buttons

    Hi,

    You need to name the macro's differently

    So for example change one of them as count and the other as count1

    The macros need to be against the sheet rather than a separate module (I think)

    then go to your worksheet, right click the Yellow4 textbox and asign macro count then repeat for the green3 text box

    Now when you clock on Yellow4 textbox it should run the macro.

    Hope that helps

  4. #4
    Registered User
    Join Date
    08-26-2010
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: assigning code to buttons

    Thank you wagstaff
    I got it now...

  5. #5
    Registered User
    Join Date
    08-26-2010
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: assigning code to buttons

    Sorry Roy, I am new to all this and was never on a thread site before either.
    I was having trouble locating my other postings and didnt see your earlier reply.
    Thanks for the info though.
    I wrote the code in the visual basic window..
    created text boxes in excel.... then right click on the boxes and clck assign macro.
    works perfect for what I want now... thanks

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: assigning code to buttons

    Just click on the bright green button by your name & select List all posts by...., you will get a list of all your posts.

  7. #7
    Registered User
    Join Date
    05-09-2009
    Location
    Manchester,England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    58

    Re: assigning code to buttons

    Glad I could assist, 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