PC Review


Reply
Thread Tools Rate Thread

Data from Combo Box

 
 
Sue
Guest
Posts: n/a
 
      11th Oct 2008
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 With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      11th Oct 2008
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" <(E-Mail Removed)> wrote in message
news:38AC5DD4-C04E-4F69-8CD2-(E-Mail Removed)...
> 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 With Quote
 
Sue
Guest
Posts: n/a
 
      11th Oct 2008
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" <(E-Mail Removed)> wrote in message
> news:38AC5DD4-C04E-4F69-8CD2-(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box Data Space Larger Than Combo Box Size MJ Microsoft Access Form Coding 6 26th Jun 2009 04:53 PM
combo box data changes based on previous combo box Damion Microsoft Access Forms 3 16th May 2007 01:34 AM
Sharing Combo Box data with other Combo Box =?Utf-8?B?QWNjZXNzIEJlZ2lubmVy?= Microsoft Access 3 12th Apr 2007 10:51 PM
Data Entry forms: use 1st combo box to filter next combo box? =?Utf-8?B?V2lsZEdvdXJk?= Microsoft Access Forms 1 23rd Jun 2006 07:43 PM
Using Combo Boxes to Display Data from Previous Combo Box select? =?Utf-8?B?SmV0aDA4MDg=?= Microsoft Access 1 12th Jun 2006 04:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:18 AM.