I'm attempting to create a notification board if a1 <1 then produce a message in the box. Suggestions for a better way of doing this?
Option Explicit
Public TermMsg As String, IDMsg As String, FNLNMsg As String, CovCodeMsg As String, EffDateMsg As String
Sub example
if range("A1").value >1 then
TermMsg = "False
else
TermMsg = "True"
end sub
Sub test()
Dim msgboxmsg As String
Dim errorbox As String
If TermMsg = "True" Then
msgboxmsg = msgboxmsg & " Processed Term Date (MM/DD/CCYY)" & vbNewLine
End If
If IDMsg = "True" Then
msgboxmsg = msgboxmsg & " Member ID" & vbNewLine
End If
If FNLNMsg = "True" Then
msgboxmsg = msgboxmsg & " First Name or Last Name" & vbNewLine
End If
If CovCodeMsg = "True" Then
msgboxmsg = msgboxmsg & " Coverage Code" & vbNewLine
Else
End If
If CovCodeMsg = "True" Then
msgboxmsg = msgboxmsg & " Original Effective Date (MM)" & vbNewLine
End If
If msgboxmsg <> vbNullString Then
errorbox = MsgBox("Could not find columns:" & vbNewLine & vbNewLine & msgboxmsg, vbOKCancel)
End If
Exit Sub
End Sub
Bookmarks