Is there any way to assign NextRow in my below code a specific cell? Right now it checks for the first blank cell in column B. Can I just assign NextRow to start at cell B9 then move down one for each invoice?
I think I tried assigning before but ran into incorrect placement of data when posting.
Thanks,
_________________
I appreciate the help from everyone at Mr. Excel.
viper
This message was edited by viper on 2002-08-25 21:06
I think I tried assigning before but ran into incorrect placement of data when posting.
Code:
'Check for next empty row
NextRow = _
Application.WorksheetFunction.CountA(Range("b:b")) + 1
'Transfer Data
Cells(NextRow, 2) = AccountName.Text
Cells(NextRow, 3) = Invoicenumber.Text
Cells(NextRow, 4) = Invoicedate.Value
Cells(NextRow, 5) = Invoiceamount.Value
Cells(NextRow, 6) = Accountnumber.Value
If Check500 Then Cells(NextRow, 7) = TextBox500.Value
If Check513 Then Cells(NextRow, :cool: = TextBox513.Value
If Check510 Then Cells(NextRow, 9) = TextBox510.Value
If Check610 Then Cells(NextRow, 10) = TextBox610.Value
If Check612 Then Cells(NextRow, 11) = TextBox612.Value
If Check613 Then Cells(NextRow, 12) = TextBox613.Value
If Check617 Then Cells(NextRow, 13) = TextBox617.Value
If Check624 Then Cells(NextRow, 14) = TextBox624.Value
If Check614 Then Cells(NextRow, 15) = TextBox614.Value
Cells(NextRow, 16) = TextBoxother.Text
Cells(NextRow, 17) = TextBoxotherdollars.Value
Cells(NextRow, 18) = TextBoxdiscription.Text
Cells(NextRow, 21) = TextBoxinitials.Text
'Close user form
Unload UserForm1
'Check if user has other invoices
GetAnswer
End If
Thanks,
_________________
I appreciate the help from everyone at Mr. Excel.
viper
This message was edited by viper on 2002-08-25 21:06