Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
I got the following code off this forum Private Sub UserForm_Initialize() Cb2.List = ActiveSheet. _ Range("A2:C200").Value End Sub ComboBox Cb2 displays the info when opened e.g. Name | Sex | DOB I have two textboxes on the Userform Tb1 & Tb2 I need Tb1 & Tb2 to fill with the data from Cb2 Sex | DOB Everytime I click on a different name - it they will change automatically I can then add them to a new sheet Named "Correct" in Cols E & F respectively been at it a couple of hours and I need you experts to guide me -- Many Thanks Sue |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Add this event procedure to your UserForm's code window...
Private Sub Cb2_Click() Tb1.Text = Cb2.Column(1) Tb2.Text = Cb2.Column(2) End Sub -- Rick (MVP - Excel) "Sue" wrote in message ... Hi all I got the following code off this forum Private Sub UserForm_Initialize() Cb2.List = ActiveSheet. _ Range("A2:C200").Value End Sub ComboBox Cb2 displays the info when opened e.g. Name | Sex | DOB I have two textboxes on the Userform Tb1 & Tb2 I need Tb1 & Tb2 to fill with the data from Cb2 Sex | DOB Everytime I click on a different name - it they will change automatically I can then add them to a new sheet Named "Correct" in Cols E & F respectively been at it a couple of hours and I need you experts to guide me -- Many Thanks Sue |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Rick
Isn't it easy when you know how?? Works a treat -- Many Thanks Sue "Rick Rothstein" wrote: Add this event procedure to your UserForm's code window... Private Sub Cb2_Click() Tb1.Text = Cb2.Column(1) Tb2.Text = Cb2.Column(2) End Sub -- Rick (MVP - Excel) "Sue" wrote in message ... Hi all I got the following code off this forum Private Sub UserForm_Initialize() Cb2.List = ActiveSheet. _ Range("A2:C200").Value End Sub ComboBox Cb2 displays the info when opened e.g. Name | Sex | DOB I have two textboxes on the Userform Tb1 & Tb2 I need Tb1 & Tb2 to fill with the data from Cb2 Sex | DOB Everytime I click on a different name - it they will change automatically I can then add them to a new sheet Named "Correct" in Cols E & F respectively been at it a couple of hours and I need you experts to guide me -- Many Thanks Sue |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combo Box Data | Excel Discussion (Misc queries) | |||
Can one combo box control the data in a different combo box | Excel Discussion (Misc queries) | |||
COMBO DATA | Excel Discussion (Misc queries) | |||
Combo Box from data in another tab | Excel Discussion (Misc queries) | |||
data val. and combo box | Excel Discussion (Misc queries) |