View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default how to deny users macro execution, please?

You can get the user's logon name with the following code:

Dim UName As String
UName = Environ("UserName")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Cristi@n" wrote in message
oups.com...
Hi group!
Does anyone of you know how to allow macro execution to certain
usernames instead than to everybody? I'm currently using
Application.UserName which can be too easily fooled.
Thank you.
Regards,
Cristi@n