View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Henry Stockbridge Henry Stockbridge is offline
external usenet poster
 
Posts: 19
Default Inability to Capture Username

Hi,

I have created an install routine using a Userform that runs code
conditional to the Username. However, the procedure is not recognizing
the value of the strName variable.

================

Sub cmdNext_Click()
Dim strName as String
strName = Environ("Username")

If strName = "doej" Or strName = "doex" Then GoTo X_Only Else GoTo
Y_Only

X_Only:
' Code here.....

Y_Only:
' Code here...

End Sub

=================

Any help you can lend would be appreciated.

Henry