Hey all,
I have a userform where my co-workers input some data from events. The button for the userform is on sheet1 and the sheet the data is put in is sheet2.
They input data first before the event and then they need to input data after the event (data before event is rows 1:10, and after event is 11:15). Two different userform but I ask for the same identification (so we can use that number to find the row)
I think i have everything else in the vba correct, i just need that row number.
My test looks like this:
I know the Match function is wrong. I have tried variations of both match and find, and nothing seemed to work for me.
The error usually tells me an object is required.
I have a userform where my co-workers input some data from events. The button for the userform is on sheet1 and the sheet the data is put in is sheet2.
They input data first before the event and then they need to input data after the event (data before event is rows 1:10, and after event is 11:15). Two different userform but I ask for the same identification (so we can use that number to find the row)
I think i have everything else in the vba correct, i just need that row number.
My test looks like this:
Code:
Private Sub CommandButton1_Click()
Dim Regnskab As Long
Worksheets("sheet2").Activate
Regnskab = WorksheetFunction.Match(CVR.Value, "C:C", 0)
Cells(Regnskab, 11).Value = salgssum.Value
Unload Me
Worksheets("sheet1").Activate
End Sub
CC
I know the Match function is wrong. I have tried variations of both match and find, and nothing seemed to work for me.
The error usually tells me an object is required.