PDA

View Full Version : [SOLVED] Want to halp USEFORM



KK1966
06-07-2008, 04:17 AM
Hi Expert's

I have many documents and data pasting into Excel WS column A to C which data contents a Name and Listing whose responding and scheduling, and the document is too many row down about 230 rows.
May I have someone help and to learn me about the code of UseForm as I'm very newly and strange on it,
can u help the details to maeking up as I want to when input the whos's Name in to useform then maybe it the combobox would ask me whos the responding and the schedules.

Thanks very much for your help.

KK1966
06-07-2008, 04:19 AM
sorry about some point missing ! Sorry

Name in the column A
Responding in the Col B
schedules in the Col C


Expert's
Urge ur help

mdmackillop
06-07-2008, 04:30 AM
Something like this?

KK1966
06-07-2008, 05:17 AM
Dear Mdmackillop

Thanks Very much, but when I select the " Name1" the box show errors to
Reposne10 & schedules10 ??

is there's any I not understand or any I should modify "

anyway ,,,your can lerm many , Thanks

mdmackillop
06-07-2008, 05:22 AM
Change this section of the code


Private Sub ComboBox1_Change()
Dim rng As Range
Set rng = Range(Cells(1, 1), Cells(1, 1).End(xlDown))
With rng.Find(ComboBox1, lookat:=xlWhole)
Label1.Caption = .Offset(, 1)
Label2.Caption = .Offset(, 2)
End With
End Sub

KK1966
06-07-2008, 05:32 AM
Dear Mdmackillop

Can work now and perfectly

If I want add a button to cancel, " Quit" the useform, how can i made the code,

Sorry My troubles

mdmackillop
06-07-2008, 05:44 AM
Revised version

Simon Lloyd
06-07-2008, 05:56 AM
Malcolm - you truly are a wizard!
I read this thread and had trouble deciphering it.

Aussiebear
06-07-2008, 06:22 AM
The Wizard of ID is Scottish?

mdmackillop
06-07-2008, 06:30 AM
Malcolm - you truly are a wizard!
I had a lot of practice with some Aussie who keeps posting around here. :whistle:

KK1966
06-07-2008, 07:20 AM
Dear Mdmackillop

Thanks very much, I really apreciate your help with I can learned a much here's


Thanks

KK1966
06-08-2008, 12:07 AM
Again about the useform questions!

I have moved the button to a "front page ( Worksheet )" & the orginal worksheet laocted at Sheets( "schedules"), now I Pop errors when I moved , whats are I should chnage that's be wotk in the frontpage,?

I have too many 13 sheets in the Workbook, so can u help me again.


Billion thanks

mdmackillop
06-08-2008, 02:00 AM
We need to specify the sheet that contains the data, if it is not the Active Sheet



Option Explicit
Private Sub UserForm_Initialize()
With Sheets("Sheet1")
ComboBox1.List = Range(.Cells(1, 1), .Cells(1, 1).End(xlDown)).Value
End With
End Sub

Private Sub ComboBox1_Change()
Dim rng As Range
With Sheets("Sheet1")
Set rng = Range(.Cells(1, 1), .Cells(1, 1).End(xlDown))
End With
With rng.Find(ComboBox1, lookat:=xlWhole)
Label1.Caption = .Offset(, 1)
Label2.Caption = .Offset(, 2)
End With
End Sub

Private Sub CommandButton1_Click()
Unload UserForm1
End Sub

KK1966
06-08-2008, 02:13 AM
Dear Mdmackillop

I had changed the code in UseForm, But it was error show in the Module of Show Useform..

KK1966
06-08-2008, 02:33 AM
sorry Mdmackillop, The Code is Work now,

Thanks You very much.

KK1966
06-08-2008, 10:15 AM
I got a problems when I Input in the comboBox which Pop errors :

Run-time error"91"
object variable with block variable not set.

I had change the col target sheets col "A to input number
col B Name
col C schedulers

just chnage the UserForm was can't be work.

Do any I made a worng.
sorry the troubles

mdmackillop
06-08-2008, 11:23 AM
Can you post a workbook with sample data?

KK1966
06-08-2008, 05:58 PM
Sample here.

Please help

mdmackillop
06-09-2008, 12:06 AM
I'm not getting any error message. What change are you trying to make?

KK1966
06-09-2008, 02:11 AM
The Errors message is same as "Run-time error"91"
object variable with block variable not set.
When i input at the ComboBox


I dont know why wl it happened

KK1966
06-09-2008, 02:19 AM
Dear Mdmackillop

Previously that's the objects is a Name can it can input to sort fastre the results, When i change it to emp#( Numeric ) ..it can't be work??

mdmackillop
06-09-2008, 05:47 AM
Private Sub ComboBox1_Change()
to

Private Sub ComboBox1_AfterUpdate()

KK1966
06-09-2008, 07:18 AM
Dear Mdmackillop

That's Work, Thanks & Apologize to my troubles.

Thanks

mdmackillop
06-09-2008, 12:57 PM
There's no need to apologise. That's the reason we come here.

If this is solved, you can mark it so using Thread Tools