+ Reply to Thread
Results 1 to 4 of 4

vbOK Message Box

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    vbOK Message Box

    I have the following code in a macro

    Please Login or Register  to view this content.
    This gives me a message box with an OK button and a cancel button. How do i change to just an OK button?

  2. #2
    Forum Contributor Stuie's Avatar
    Join Date
    09-17-2006
    Location
    Suffolk, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    432

    Re: vbOK Message Box

    Hi adam2308,

    You can use vbOkOnly.

    eg.
    Please Login or Register  to view this content.
    Hope this helps
    There are only 10 types of people in the world:
    Those who understand binary, and those who don't!

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: vbOK Message Box

    I guess the question would be why you need a variable if you have a predetermined response - and that is more of a warning than a choice, ie why not just:

    Please Login or Register  to view this content.
    I'm not sure I see the value in having a variable assigned to the response.

  4. #4
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: vbOK Message Box

    the second reply is correct and this wold suit best. 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