D
Darla
I'm creating a userform to be filled in and when the "OK"
control button is clicked it will fill the information in
on the next available row on the spreadsheet. Following
is the code I wrote but it's not working right. It's
telling me I didn't call out variables. I know my brain
is just not working at the moment but, Is it the "nextrow"
that I need to call out? Please Help. Thanks in advance!!
Here's the code I was copying out of a book:
Private Sub CommandButton2_Click()
'Make sure Sheet1 is active
Sheets("Sheet1").Activate
'Determine the next empty row
Nextrow = Application.WorksheetFunction.CountA(Range
("A:A")) + 1
'Transfer Name
Cells(Nextrow, 1) = TEXTDATE.Text
Cells(Nextrow, 2) = TEXTCUSTOMER.Text
Cells(Nextrow, 3) = TEXTPO.Text
Cells(Nextrow, 4) = TEXTOPERATOR.Text
'Clear the controls for the next entry
TEXTDATE.Text = ""
TEXTCUSTOMER.Text = ""
TEXTPO.Text = ""
TEXTOPERATOR.Text = ""
TEXTDATE.SetFocus
End Sub
..
control button is clicked it will fill the information in
on the next available row on the spreadsheet. Following
is the code I wrote but it's not working right. It's
telling me I didn't call out variables. I know my brain
is just not working at the moment but, Is it the "nextrow"
that I need to call out? Please Help. Thanks in advance!!
Here's the code I was copying out of a book:
Private Sub CommandButton2_Click()
'Make sure Sheet1 is active
Sheets("Sheet1").Activate
'Determine the next empty row
Nextrow = Application.WorksheetFunction.CountA(Range
("A:A")) + 1
'Transfer Name
Cells(Nextrow, 1) = TEXTDATE.Text
Cells(Nextrow, 2) = TEXTCUSTOMER.Text
Cells(Nextrow, 3) = TEXTPO.Text
Cells(Nextrow, 4) = TEXTOPERATOR.Text
'Clear the controls for the next entry
TEXTDATE.Text = ""
TEXTCUSTOMER.Text = ""
TEXTPO.Text = ""
TEXTOPERATOR.Text = ""
TEXTDATE.SetFocus
End Sub
..