+ Reply to Thread
Results 1 to 3 of 3

Command Button VBA Code

Hybrid View

kiddos5 Command Button VBA Code 10-18-2012, 06:08 PM
stnkynts Re: Command Button VBA Code 10-18-2012, 07:11 PM
jeffreybrown Re: Command Button VBA Code 10-18-2012, 07:13 PM
  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    Baytown, Texas
    MS-Off Ver
    Excel 2007
    Posts
    1

    Command Button VBA Code

    I have an assignment to code a command button then assign a VBA macro to it. When the command button is initiated it should give a list of titles (Headers) to sort the data by. My headers are Day, Called, Nature of Call, & Length of Call. I know how to record a macro and how to insert command button, but am clueless how to do this. Can anyone help? Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Command Button VBA Code

    Dear kiddos5,

    I am a little hesitant to give you a direct answer because to me this sounds like a homework assignment. Maybe others on the forum might be more inclined to just give you the answer and send you on your way but I think your teacher might notice the difference between the advanced code some can give and the beginning code you can generate yourself.

    Some tips:
    - you know how to record a macro and you know how to insert a command button. Just copy the recorded macro into the code source of the command button and it should word on-click.
    - not sure what you mean by "give a list of titles" but if it is simply a list then a simple message box would work. The message box can include your text plus cell values (titles in this scenario).

    If you have specific questions on your code feel free to ask. If I am wrong on this being a homework assignment and in actuality is a work related project let us know and we can talk about the specific information we will need to help you out.

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Command Button VBA Code

    Along with what stnkynts said, what about...

    http://office.microsoft.com/en-us/ex...010236676.aspx

    ...and google can pull up lots of helpful hints and advice.
    HTH
    Regards, Jeff

+ 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