Go to Workbook's private module and type this code in Open Workbook event:
If Environ("UserName") <> "USERNAME HERE" Then
'your code here
ThisWorkbook.close ' if you want to close the workbook
End If
_________________________________________________________________________________________________
"There are known knowns. These are things we know that we know. There are known
unknowns. That is to say, there are things that we know we don't know. But
there are also unknown unknowns. There are things we don't know we don't know."
--- On Tue, 11/11/08, TERTIUS KOSHY THOMAS <[EMAIL PROTECTED]> wrote:
From: TERTIUS KOSHY THOMAS <[EMAIL PROTECTED]>
Subject: $$Excel-Macros$$ Macro for Login Page
To: [email protected]
Date: Tuesday, 11 November, 2008, 7:25 AM
Hi all,
I need to create a login input box for a workbook.When someone open the
workbook, the login input box must pop up and ask the user to key in the USER
ID. The table of user id is actually in one of the sheets in the same workbook.
So the macro can compare with the user input to the userid table and decide
whether need to open the Excel workbook.
A sample work book is attached, Sheet 2 has the list of few user ids.
PS:- No password required.
Regards,
Tertius.
Add more friends to your messenger and enjoy! Go to
http://messenger.yahoo.com/invite/
--~--~---------~--~----~------------~-------~--~----~
Visit the blog to download Excel tutorials at
http://www.excel-macros.blogspot.com
To post to this group, send email to [email protected]
For more options, visit this group at
http://groups.google.com/group/excel-macros?hl=en
Visit & Join Our Orkut Community at
http://www.orkut.com/Community.aspx?cmm=22913620
Visit the blog to download Excel tutorials at
http://www.excel-macros.blogspot.com
To Learn VBA Macros Please visit http://www.vbamacros.blogspot.com
To see the Daily Excel Tips, Go to:
http://exceldailytip.blogspot.com
-~----------~----~----~----~------~----~------~--~---