Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I created a multipage userform in excel VBA. userform Page 1 for info data entry excel sheet sample below A B C D Name Age case# file# 1 Mr. x 27 2345 5677 2 Ms. Y 49 2356 5678 userform Page 2 for number of hours worked entry: Name <Combobox stating row source Age <label 1 Case# <label2 File# <label3 Hours < will type in My question is , if I select a name in combobox in userform page 2 , how it is possible to display corresponding data in label 1 , label 2 and label 2 automatically. Please help. -- rahul25 ------------------------------------------------------------------------ rahul25's Profile: http://www.excelforum.com/member.php...o&userid=28899 View this thread: http://www.excelforum.com/showthread...hreadid=490070 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assuming data on Sheet2 try something like:
Private Sub cmbName_Change() Dim fndName As Range With Sheets(2).Columns(1) '<<change as required Set fndName = .Find(Me.cmbName.Value) End With If Not fndName Is Nothing Then Me.lblAge.Caption = fndName.Offset(0, 1).Value Me.lblCase.Caption = fndName.Offset(0, 2).Value Me.lblFile.Caption = fndName.Offset(0, 3).Value End If DoEvents End Sub Hope this helps Rowan rahul25 wrote: I created a multipage userform in excel VBA. userform Page 1 for info data entry excel sheet sample below A B C D Name Age case# file# 1 Mr. x 27 2345 5677 2 Ms. Y 49 2356 5678 userform Page 2 for number of hours worked entry: Name <Combobox stating row source Age <label 1 Case# <label2 File# <label3 Hours < will type in My question is , if I select a name in combobox in userform page 2 , how it is possible to display corresponding data in label 1 , label 2 and label 2 automatically. Please help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|