Results 1 to 13 of 13

Getting yes & no buttons to work in MsgBox

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Getting yes & no buttons to work in MsgBox

    I think im missing an "IF" or "=" but spent hours now trying to figure this out but cant




    Private Sub email_Click()
    
    Dim resp
    
    resp = MsgBox(vbTab & "Click YES if you would you like to view common issues?" & vbCrLf & vbTab & "Or" & vbCrLf & vbTab & "click NO to email the cost model along with an issue/query?" & vbCrLf & vbTab & "Or" & vbCrLf & vbTab & "click CANCEL to return", vbYesNoCancel + vbQuestion, "User input part help?")
    
    If resp = vbNo Then
     '
     ' email Macro
     '
     '
     '
     ActiveWorkbook.Save
     'Optional parameters for xlDialogSendMail are: Recipients, Subject,
     Application.Dialogs(xlDialogSendMail).Show "name@company.co.uk", "Cost Model Query"
    End If
     
    If resp = vbYes Then
    Yes = MsgBox(vbCrLf & vbTab & "Please make sure you have done the following:" & vbCrLf & vbTab & "" & vbCrLf & vbTab & "1. Enter Category & Customer in cells C1 & C2?" & vbCrLf & vbTab & "2. Enter all information required in the part input box?" & vbCrLf & vbTab & "3. Filled all required entries in blue cells & packhouse info section?" & vbCrLf & vbTab & "4. Calculated labour hours per case in calculator tab?" & vbCrLf & vbTab & "" & vbCrLf & vbTab & "If you still require further help please email.contact name" & vbCrLf & vbTab & "" & vbCrLf & vbTab & "Email. name@Company.co.uk" & vbCrLf & vbTab & "Tel. ", vbOK)
    End If
    
    If MsgBox = vbYes Then
    'email Macro
    ActiveWorkbook.Save
    'Optional parameters for xLDialogSendMail are: Recipients, Subject,
    Application.Dialogs(xlDialogSendMail).Show "name@company.co.uk", "Cost Model Help"
    End If
    
    End Sub
    Basically i want to display the box "help? continue to common issues, email to email, cancel to return

    If they then go common issues and decide to email i want the user to email, if they think "yes the common issues help i want to go back to the sheet, then go back to the sheet?????
    Last edited by shiftyspina; 05-02-2013 at 11:57 AM. Reason: confidentiality

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