Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Guys
I'm at a loss as to why this isnt working... If Application.UserName = (my username here) Then Unload Userform1 Else MsgBox Application.UserName End If I put the msgbox bit in just in case there was a problem with my username....it looks exactly the same as typed, i dont geddit... any ideas anyone? Duncan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
If Trim(Application.UserName) = "Bob" Then Unload UserForm1 Else MsgBox Application.UserName End If -- HTH Bob Phillips (remove xxx from email address if mailing direct) "Duncan" wrote in message ups.com... Hi Guys I'm at a loss as to why this isnt working... If Application.UserName = (my username here) Then Unload Userform1 Else MsgBox Application.UserName End If I put the msgbox bit in just in case there was a problem with my username....it looks exactly the same as typed, i dont geddit... any ideas anyone? Duncan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Duncan,
AFAIK, this returns the name entered when Excel/Office was first installed i.e. the name that appears in the HelpAbout.. box, not necessarily your windows username. NickHK "Duncan" wrote in message ups.com... Hi Guys I'm at a loss as to why this isnt working... If Application.UserName = (my username here) Then Unload Userform1 Else MsgBox Application.UserName End If I put the msgbox bit in just in case there was a problem with my username....it looks exactly the same as typed, i dont geddit... any ideas anyone? Duncan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob:- Many thanks the trim did make it work
Nick: - I think you are right but in this instance our users have a generic install pattern which grabs their username from novell login, (i dont really understand how or why but the end result is the usernames end up the same so that is all good!) Many thanks both, Duncan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
small fuction problem pass arguments | Excel Programming | |||
small problem | Excel Worksheet Functions | |||
Vlookup data wrong if the small value found are same | Excel Discussion (Misc queries) | |||
A small problem for you but big for me! | Excel Discussion (Misc queries) | |||
Problem with small()....I think | Excel Worksheet Functions |