+ Reply to Thread
Results 1 to 2 of 2

msgbox vbyesno

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    msgbox vbyesno

    Hi

    I am struggling to work out how to get the vbyesno statements from a msgbox to work for my user defined function below.
    the statements are

    MsgBox "You have selected to use " & N & " days" & " of data" _
    & " and you have selected a price range of:" & PriceRange.Address(external:=True) & "," & " is this OK?", vbYesNo
    If MsgResult = vbNo Then End

    and

    msgBox "Would you like to use the annualised volatility to calculate the sharpe ratio of the selected range?", vbYesNo
    If MsgResult = vbNo Then Exit Function


    However both the do not work as the function keeps running. Please how can i get them to work and end the procedure once no is clicked? coding below.

    Thanks

    Please Login or Register  to view this content.
    Last edited by newbielondon; 06-18-2012 at 06:34 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: msgbox vbyesno

    Msgbox is a function; it returns a value:

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

+ 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