G
Guest
Guest
I have a list of documents with expiration dates. I was using a message box to show which documents have expired, but the message box is too small to fit the entire list.
I am now trying to use a user form, but I cannot get it to display the documents. I pasted the code that I am using for the query (see below) into a label box on the userform, but when I run it, it comes up blank. Here is the code:
Dim Z, Q As Integer
Dim GN, GD As String
Dim Response4, Msg4, Title4, Style4
Sheets(1).Activate
For Q = 2 To Range("A65536").End(xlUp).Row
GT = Range("E" & Q)
If Now() - 1095 > GT Then GN = GN & " " & Range("E" & Q) & " " & Range("A" & Q) & Chr$(13)
Next Q
Msg4 = ("THE FOLLOWING DOCUMENTS HAVE EXPIRED: " & vbLf & GN)
Title4 = "Expired Documents"
Style4 = vbCritical
Response4 = MsgBox(Msg4, Style4, Title4, Help, Ctxt)
Any suggestions?
Thanks!
I am now trying to use a user form, but I cannot get it to display the documents. I pasted the code that I am using for the query (see below) into a label box on the userform, but when I run it, it comes up blank. Here is the code:
Dim Z, Q As Integer
Dim GN, GD As String
Dim Response4, Msg4, Title4, Style4
Sheets(1).Activate
For Q = 2 To Range("A65536").End(xlUp).Row
GT = Range("E" & Q)
If Now() - 1095 > GT Then GN = GN & " " & Range("E" & Q) & " " & Range("A" & Q) & Chr$(13)
Next Q
Msg4 = ("THE FOLLOWING DOCUMENTS HAVE EXPIRED: " & vbLf & GN)
Title4 = "Expired Documents"
Style4 = vbCritical
Response4 = MsgBox(Msg4, Style4, Title4, Help, Ctxt)
Any suggestions?
Thanks!