Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ADK ADK is offline
external usenet poster
 
Posts: 89
Default textbox to return User Name

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default textbox to return User Name

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default textbox to return User Name

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   Report Post  
Posted to microsoft.public.excel.programming
ADK ADK is offline
external usenet poster
 
Posts: 89
Default textbox to return User Name

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default textbox to return User Name

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox Return Johnny Excel Discussion (Misc queries) 1 January 31st 07 07:29 PM
textbox on user form Mike Excel Programming 3 December 2nd 05 04:43 PM
User Form in VB = TextBox Kel Excel Discussion (Misc queries) 1 August 11th 05 12:26 AM
way to run sub after user exits textbox funkymonkUK[_50_] Excel Programming 2 July 12th 05 01:10 PM
Textbox trouble on a user form Oreg[_3_] Excel Programming 7 May 27th 04 12:36 AM


All times are GMT +1. The time now is 09:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"