Dave, thanks again! This is awesome. Thanks so much for taking the time to
help me with this. I really appreciate it!
"Dave Peterson" wrote:
When I was developing a workbook, I'd change my username to:
Dave Petersonxxx
(via tools|Options|General Tab (in xl2003 menus)
Then I'd check for that username when I needed to save without the checks.
But when I was testing my code, I'd change my username back to normal. Then I
could see if the code broke.
if lcase(application.username) = lcase("dave petersonxxx") then
'do nothing
else
'do the work
end if
It worked nicely when I wanted to be a user sometimes and a developer other
times.
p45cal wrote:
"Another option would be to look at the some indicator
(application.username???) and process accordingly."
Yes, I've done this in the past, though *Application.username* might
not be good if on a company network if your username (the same username
that's to be found in the -Options- dialogue box -General -tab reached
via the dropdown menus *Tools|Options...*) is common to other user's
User Names there. I worked for a largish company where they installed MS
Office and the Username was always the company name.
Easy to solve, make sure your UserName is likely to be unique. Anyone
can change the MSOffice username easily in this dialogue box.
In the code you could add:
If Application.UserName="YourUniqueName" then 'at the
top of the sub
'your present code here
'
'
End if 'at the bottom of the sub
In the corporate environment I used *Environ("Username")* which is the
same as the log on to the network/machine, which is something very
likely to be unique to each user.
--
p45cal
*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=134027
--
Dave Peterson