+ Reply to Thread
Results 1 to 8 of 8

Command Button and Order

  1. #1
    Registered User
    Join Date
    06-04-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    8

    Red face Command Button and Order

    Hello! I would like to have a command button that when clicked, will make a word appear to the row after the cell that contains the word "Stars Gap" in Sheet "Edit"
    But the thing is, "Stars Gap" would not always be in the same row but it is always in the same column. Sometimes, it is written in Range B40 or B50 or B63.

    Example:

    pic1.JPG

    Next, when I clicked a command button, a word will appear on the next roq.

    pic2.JPG

    and when I clicked another command button, another word will appear. They should be on the same row but next paragraph? Because I want the word to appear base on the order in clicking the buttong

    pic3.JPG

    sometimes, I will click all the command button or only a few of them.

    Thank you. Please help

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Command Button and Order

    If you use buttons from the Forms menu, change the buttons' text to what you want and assign this macro to each of the buttons.

    Please Login or Register  to view this content.
    If you click a button, its text will be added at the end of the cell. Note that multiple entries are possible, but immediate duplicates are not.

    e.g.

    Adherence
    Control
    Adherence

    is possible, but

    Control
    Control
    Primary
    is not
    Attached Files Attached Files
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    06-04-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    8

    Re: Command Button and Order

    Thanks for the help. However, when I tried using the codes this what happened.
    pic4.JPG

    I am hoping that it would appear like the image below

    pic5.JPGpic5.JPG

    is it possible? thanks

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Command Button and Order

    change this line
    Please Login or Register  to view this content.
    for this one.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Command Button and Order

    You also might add this after the changed line.
    Please Login or Register  to view this content.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Command Button and Order

    @ mikerickson

    The moment you add a second value WrapText in this case is automatically activated so no need to put it in extra.

  7. #7
    Registered User
    Join Date
    06-04-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    8

    Re: Command Button and Order

    hi, thanks for the help.

    What if I like to a place the word "None" beside the word "Stars Gap:"? What formula should I use? I also like to use a command button

    Example:

    Stars Gap: None

    They should be on the same cell. The word "Stars Gap" would also be somewhere in column B.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Command Button and Order

    Please Login or Register  to view this content.

+ 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. Replies: 2
    Last Post: 02-02-2016, 10:27 PM
  2. Insert Command Button that will Activate Command Button on a Different Sheet
    By realvirtuality1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2016, 02:11 PM
  3. VBA code to create command button. Print all sheets then delete command button.
    By Declamatory in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-15-2015, 05:18 PM
  4. [SOLVED] Order Form to Summarise Order on another sheet with a Submit Order Button
    By KazzICC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-01-2014, 03:25 AM
  5. Replies: 2
    Last Post: 07-13-2013, 01:10 AM
  6. Replies: 1
    Last Post: 09-17-2007, 09:57 PM
  7. Replies: 0
    Last Post: 11-03-2005, 11:00 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