Hi - The code below should prompt the user, asking them if they would like to review an Edit Report before saving to oracle... However when I run the code the "EditAlert" prompt doesn't appear. I see the prompt quickly appear on screen, but for some reason excel defaults the answer to Yes (without giving the user a chance to slect yes or no). Does anyone have any idea why this is happening? Please advise. Thanks.
Sub editprompt()
Dim EditAlert, Style, Title, Help, Ctxt, Answer
If Range("EditsCount").Value > 0 Then
EditAlert = "There are " & Worksheets("db").Range("ak1508").Value & " Edit Failures." & (Chr(13)) & "Would you like to review the Edit Report before saving to Oracle?"
Style = vbYesNo + vbExclamation + vbDefaultButton1
Title = "Edit Alert"
Answer = MsgBox(EditAlert, Style, Title, Help, Ctxt)
If Answer = vbYes Then
gotoCSEDITS
Exit Sub
End If
If Answer = vbNo Then
oraclesave
End If
End If
oraclesave
End Sub
Sub editprompt()
Dim EditAlert, Style, Title, Help, Ctxt, Answer
If Range("EditsCount").Value > 0 Then
EditAlert = "There are " & Worksheets("db").Range("ak1508").Value & " Edit Failures." & (Chr(13)) & "Would you like to review the Edit Report before saving to Oracle?"
Style = vbYesNo + vbExclamation + vbDefaultButton1
Title = "Edit Alert"
Answer = MsgBox(EditAlert, Style, Title, Help, Ctxt)
If Answer = vbYes Then
gotoCSEDITS
Exit Sub
End If
If Answer = vbNo Then
oraclesave
End If
End If
oraclesave
End Sub