locked
Help needed with MsgBox RRS feed

  • Question

  • Hi, I am trying to insert a quote and then a value from a cbo_box inside a msgbox, but keep getting a 'Run time 5' error. This is my vba script

     

    MsgBox "Please check selling price - Variance over 30%" + Str(MyForm.cbo_price.Value), vbOKOnly, vbExclamation, "INFORMATION"
    Thursday, June 21, 2007 11:40 AM

Answers

  • Hi

     

    Change your code to

     

    Dim Resp

    Resp=MsgBox ("Please check selling price - Variance over 30%" + Str(MyForm.cbo_price.Value), vbOKOnly,  "INFORMATION)
    Thursday, June 21, 2007 12:34 PM

All replies

  • Hi

     

    Change your code to

     

    Dim Resp

    Resp=MsgBox ("Please check selling price - Variance over 30%" + Str(MyForm.cbo_price.Value), vbOKOnly,  "INFORMATION)
    Thursday, June 21, 2007 12:34 PM
  • Cheers it worked, just out of interest what does the resp do?
    Thursday, June 21, 2007 12:39 PM
  • The message box returns a value so that you now which of the buttons has been selected, Resp is just a variable to collect this return value.
    Thursday, June 21, 2007 12:51 PM