+ Reply to Thread
Results 1 to 5 of 5

Multiple options messagebox

  1. #1
    Registered User
    Join Date
    02-08-2005
    Location
    Kent, UK
    MS-Off Ver
    2010
    Posts
    69

    Multiple options messagebox

    I'd like to have a message box appear when I run a macro that asks me if I want to use overdue OR due today OR due tomorrow OR due this week OR due this month.

    Depending on the selection I'd like the macro to then filter a report in a certain way. I've created a YesNoCancel message box already and the code looks like this:

    Please Login or Register  to view this content.
    How could I change this to allow me to select one of the 5 options I mentioned at the top? Checkbox?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Multiple options messagebox

    Hello koltregaskes,

    The easiest and most flexible solution is to create a UserForm. Place 5 buttons on the UserForm and have each button execute one of the five macros you have written.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-08-2005
    Location
    Kent, UK
    MS-Off Ver
    2010
    Posts
    69

    Re: Multiple options messagebox

    I'm trying to avoid that if possible. Could the macro display a form itself? I see there is a frmMsgBox.MsgCstm command but upon quickly trying it I couldn't get it to work. Could I create a form using frmMsgBox.MsgCstm?

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

    Re: Multiple options messagebox

    Why avoid the simplest solution? You can create a UserForm on the fly, but it's easier to create the form first
    Hope that helps.

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

    Free DataBaseForm example

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

    Re: Multiple options messagebox

    Sample code to produce a userform with OptionButtons to run code

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by royUK; 06-29-2011 at 11:29 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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