Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to insert the inputed values of an userform into the last row
of 3 different worksheets (with unique names) where no data has been filled in yet ? I have already tried the underneath but the macro stops when it has to tackle the next sheet. Is there a way to solve this problem ? Sub cmdok_click() Sheets("uuroverzicht").Cells(4, 1).Select Selection.End(xlDown).Select ActiveCell.Offset(1, 0).Range("A1").Select For a = 4 To 100 If Sheets("uuroverzicht").Cells(a, 1) = ActiveCell Then Sheets("uuroverzicht").Cells(a, 1).Value = txtSDnr.Text Sheets("uuroverzicht").Cells(a, 2).Value = txtvoornaam.Text Sheets("uuroverzicht").Cells(a, 3).Value = txtachternaam.Text Sheets("uuroverzicht").Cells(a, 4).Value = txtgeboortedatum.Text Sheets("uuroverzicht").Cells(a, 5).Value = txtindienst.Text Sheets("uuroverzicht").Cells(a, 7).Value = txtABM.Text Sheets("uuroverzicht").Cells(a, 8).Value = txtMF.Text Sheets("uuroverzicht").Cells(a, 9).Value = cboafdeling.Text End If Next Sheets("globaal uuroverzicht").Cells(496, 1).Select Selection.End(xlDown).Select ActiveCell.Offset(1, 0).Range("A1").Select For b = 6 To 1000 If Sheets("globaal uuroverzicht").Cells(b, 1) = ActiveCell Then Sheets("globaal uuroverzicht").Cells(b, 1) = txtSDnr Sheets("globaal uuroverzicht").Cells(b, 2) = txtvoornaam Sheets("globaal uuroverzicht").Cells(b, 3) = txtachternaam Sheets("globaal uuroverzicht").Cells(b, 4) = txtgeboortedatum Sheets("globaal uuroverzicht").Cells(b, 5) = txtindienst Sheets("globaal uuroverzicht").Cells(b, 6) = txtABM Sheets("globaal uuroverzicht").Cells(b, 7) = txtMF Sheets("globaal uuroverzicht").Cells(b, 8) = cboafdeling End If Next End Sub Greetings |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for copying specific rows from various worksheets to summary | Excel Discussion (Misc queries) | |||
Copying worksheets with hyperlinks to named cells | New Users to Excel | |||
Copying multiple rows to other worksheets (but amount of rows varies) - How? | Excel Discussion (Misc queries) | |||
zero value when copying cells between worksheets | Excel Discussion (Misc queries) | |||
copying cells from other worksheets | Excel Discussion (Misc queries) |