+ Reply to Thread
Results 1 to 4 of 4

Stop numbers appearing after message box

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-07-2013
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    158

    Stop numbers appearing after message box

    Hi all

    I have pieced this together, however I keep getting the 6 appear after pressing yes and 7 after no. I have looked up online and its related to the results from yes or no message box.

    I just get stop them.

    Any ideas?

    Help will be greatly appreciated

    Thanks
    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    
    Dim MSGEMail As Long
        
    Sheets("Cover Sheet").Select
    
        MSGEMail = MsgBox("Remediation Report is now fully complete" & vbCr & vbCr & "Would you like to email the report back to the Asset Quality Manager?", vbQuestion + vbYesNo)
    
     'Create Email once all complete
     If Sheets("Cover Sheet").Range("I11").Value = "Section Complete" And Sheets("Cover Sheet").Range("I13").Value = "Section Complete" _
     And Sheets("Cover Sheet").Range("I15").Value = "Section Complete" And Sheets("Cover Sheet").Range("I17").Value = "Section Complete" And Sheets("Cover Sheet").Range("I19").Value = "Section Complete" Then
     
     MsgBox MSGEMail
     End If
         
     If MSGEMail = vbYes Then
     Call Email_from_RM
     End If

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Stop numbers appearing after message box

    why not just do this...

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    
    Dim MSGEMail As Long
        
    Sheets("Cover Sheet").Select
    
         'Create Email once all complete
     If Sheets("Cover Sheet").Range("I11").Value = "Section Complete" And Sheets("Cover Sheet").Range("I13").Value = "Section Complete" _
     And Sheets("Cover Sheet").Range("I15").Value = "Section Complete" And Sheets("Cover Sheet").Range("I17").Value = "Section Complete" And Sheets("Cover Sheet").Range("I19").Value = "Section Complete" Then
     
     MSGEMail = MsgBox("Remediation Report is now fully complete" & vbCr & vbCr & "Would you like to email the report back to the Asset Quality Manager?", vbQuestion + vbYesNo)
    
     End If
         
     If MSGEMail = vbYes Then
     Call Email_from_RM
     End If
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Contributor
    Join Date
    06-07-2013
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    158

    Re: Stop numbers appearing after message box

    Thank you sir!

  4. #4
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Stop numbers appearing after message box

    Glad I could help....thanks for the +rep

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to Stop #Value appearing?
    By chapman73 in forum Excel General
    Replies: 2
    Last Post: 11-20-2012, 06:02 PM
  2. [SOLVED] Stop Excel's UPDATE\Don't UPDATE message box from appearing every time I open the work book
    By divya in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2006, 03:25 AM
  3. Stop "save changes" message appearing
    By DJ Dusty in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2006, 10:42 AM
  4. [SOLVED] How do I stop the template help from appearing on startup
    By Allan_D_Ziegler in forum Excel General
    Replies: 0
    Last Post: 07-06-2005, 12:05 AM
  5. [SOLVED] how do I stop this appearing.......#DIV/0!
    By Scudo in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 07-02-2005, 09:05 PM

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