Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you can, how can I return the User Name in a TextBox on a UserForm.
User Name being the one in Excel|Options|General Tab|User Name: (Excel 2000) Thanks, -ADK |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
UserForm1.TextBox1.Value = Application.UserName
Note: I do not have Excel 2000 to test on. Tested in 2002 & 2003 Charles ADK wrote: If you can, how can I return the User Name in a TextBox on a UserForm. User Name being the one in Excel|Options|General Tab|User Name: (Excel 2000) Thanks, -ADK |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It would work back to Excel 97 for sure.
Versions before that didn't have userforms, but I would bet they supported application.Username at least back to xl5 (before that, no VBA). -- Regards, Tom Ogilvy "Die_Another_Day" wrote: UserForm1.TextBox1.Value = Application.UserName Note: I do not have Excel 2000 to test on. Tested in 2002 & 2003 Charles ADK wrote: If you can, how can I return the User Name in a TextBox on a UserForm. User Name being the one in Excel|Options|General Tab|User Name: (Excel 2000) Thanks, -ADK |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Like this:
Private Sub TextBox1_Change() UserForm1.TextBox1.Value = Application.UserName End Sub It doesn't seem to show any result in the textbox "Die_Another_Day" wrote in message oups.com... UserForm1.TextBox1.Value = Application.UserName Note: I do not have Excel 2000 to test on. Tested in 2002 & 2003 Charles ADK wrote: If you can, how can I return the User Name in a TextBox on a UserForm. User Name being the one in Excel|Options|General Tab|User Name: (Excel 2000) Thanks, -ADK |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Putting it in the change event wouldn't make much sense.
Change doesn't fire until you enter something in the textbox. May put the code in Private Sub Userform_Initialize() ' yes, userform, not userform1 UserForm1.TextBox1.Value = Application.UserName End Sub -- Regards, Tom Ogilvy "ADK" wrote in message ... Like this: Private Sub TextBox1_Change() UserForm1.TextBox1.Value = Application.UserName End Sub It doesn't seem to show any result in the textbox "Die_Another_Day" wrote in message oups.com... UserForm1.TextBox1.Value = Application.UserName Note: I do not have Excel 2000 to test on. Tested in 2002 & 2003 Charles ADK wrote: If you can, how can I return the User Name in a TextBox on a UserForm. User Name being the one in Excel|Options|General Tab|User Name: (Excel 2000) Thanks, -ADK |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Textbox Return | Excel Discussion (Misc queries) | |||
textbox on user form | Excel Programming | |||
User Form in VB = TextBox | Excel Discussion (Misc queries) | |||
way to run sub after user exits textbox | Excel Programming | |||
Textbox trouble on a user form | Excel Programming |