Since you have one primary user that will check cert status it would work better to configure a process that checks the stats and can be activated on-demand by pressing a button. That would be less intrusive than having a message auto run.
To get to the actual question... the way you would interface cell values to a msgbox text or controls on a user form would be to concatonate the text using a variable then assign the variable to the msg or userform control. It is simple to assign the text to the message. The more complex question is what process will be used in evaluating the records. How is the UI configured. How is the code going to be organized.
Here is an example of using a variable to build a message:
Code:
Sub setMsg()
dim strCellVal as string
dim msg as string
dim i as integer
i = 5
strCellVal = ActiveSheet.Cells(i, 2)
msg = "The value of the Range B" & i & " = " & strCellVal
msgbox msg
End Sub
In this simple example you do not have any logic to give you the data you need. A functional process may be outlined like this.
- Toolbar created with button to activate worksheet eval proc.
- Eval process loops through all records on the worksheet and gets count of records with Expired Certs, and Count of records within 10 days of Expiration.
- Count of records is displayed to the user in a Yes/Know msgbox that offers user the option of showing the records expired and nearing expiration.
- If user selects Yes to msg a process runs to set a filter on data to only show the records that are Expired or nearing Expiration.
Like so many things the concept is so simple.