I'm currently trying to write a script that requires a notification bar in the form. The script itself is responsible for creating invoices, which works so well. However, I want to display errors and information in a label. The label is already in a frame and I have the following code as well:
Private Function notificate(msg As String, Optional title As String)
lbl_notification.Caption = msg
If Not IsEmpty(title) Then
frm_notification.Caption = title
Else
frm_notification.Caption = ""
End If
frm_notification.Visible = True
Application.Wait (Now + TimeValue("0:00:10"))
frm_notification.Visible = False
frm_notification.Caption = ""
lbl_notification.Caption = ""
notificate = True
End Function
(I am not sure if it should be a subroutine or a function.)
How do I get this function to work so that I can use my form at the same time, if that is possible?