-
Pass public variable to Sub
Public strSubject As String
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
strSubject = Item.Subject
MsgBox (strSubject)
UserForm1.Show
End Sub
Private Sub ButtonOK_Click()
MsgBox strSubject
End Sub
This is a test program. I want to pass the value in var strSubject to the form when i click a button.
When i click the button it showing empty.. Could someone help how to pass a public variable to sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules