how to deny users macro execution, please?

  • Thread starter Thread starter Cristi@n
  • Start date Start date
C

Cristi@n

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
 
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
 
Try to the logon username
environ("username")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Hi Guys,
Thanks very much!
That's exactly what I was seeking for ;-)

Ciao,
Cristi@n
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top