Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Populate TextBox with other textbox value

Hello,


....
Private Sub UserForm_Initialize()
Me.UserName = Environ("username")
....


I have two textbox that I fill it based on the value of first textbox
(UserName)

Taking the data in a sheet called "Users" with fields (Username,
Name_FirstName, Phone)

Thanks in advance

Yves
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default Populate TextBox with other textbox value

hello Yves,

Private Sub UserForm_Initialize()
Dim sUserName As String, x As Integer
sUserName = Environ("username")
With Sheets("Users")
If Not IsError(Application.Match(sUserName, .Range("A:A"), 0)) Then
x = Application.Match(sUserName, .Range("A:A"), 0)
TextBox1 = .Range("A" & x)
TextBox2 = .Range("B" & x)
TextBox3 = .Range("C" & x)
End If
End With
End Sub


--
isabelle

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Populate TextBox with other textbox value

Hello Isabelle,

Big Thanks to you.

Yves


hello Yves,

Private Sub UserForm_Initialize()
Dim sUserName As String, x As Integer
sUserName = Environ("username")
With Sheets("Users")
If Not IsError(Application.Match(sUserName, .Range("A:A"), 0)) Then
x = Application.Match(sUserName, .Range("A:A"), 0)
TextBox1 = .Range("A" & x)
TextBox2 = .Range("B" & x)
TextBox3 = .Range("C" & x)
End If
End With
End Sub





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
Populate TextBox with Change Event Johnny Excel Programming 5 December 5th 09 12:16 AM
populate listbox as textbox changes question Gary Keramidas Excel Programming 1 July 15th 07 07:18 AM
Use a formula to populate a label from a textbox damorrison Excel Discussion (Misc queries) 5 September 4th 06 01:30 PM
Populate a cell with TextBox info Sony Excel Programming 5 November 1st 04 04:00 PM


All times are GMT +1. The time now is 06:41 AM.

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

About Us

"It's about Microsoft Excel"