Hi,
I’m trying to work with a variable value in a form event procedure. The variable is declared globally:
Option Explicit
Public ActiveUserName As String ‘Active User Name
The event procedure I’m having trouble with is this:
Private Sub cmdCnclUserName_Click() ‘Cancel button
ActiveUserName = Application.UserName ‘Retains a value during cancel operation
frmUserName.Hide ‘Hides form
Unload frmUserName ‘Unloads form
End ‘Ends processing
End Sub
The main problem is that ActiveUserName keeps coming up empty, despite the fact that it has been assigned a value in an earlier procedure.
Thanks,
Bob