LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default next empty row

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

..


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
why a reference to an empty cell is not considered empty Nicoscot Excel Discussion (Misc queries) 10 March 10th 06 05:36 AM
in excel..:can't empty clip are" but already empty Alan Gauthier Excel Discussion (Misc queries) 0 February 10th 06 08:02 PM
Excel - Autom. Filter "Empty / Non Empty cells" should come first Rom Excel Discussion (Misc queries) 0 August 10th 05 04:32 PM
How can I convert empty strings to empty cells? Shane Excel Discussion (Misc queries) 2 July 19th 05 12:10 PM
Can blank cells created using empty Double-Quotes not be empty?? JohnI in Brisbane Excel Programming 6 September 7th 03 11:22 PM


All times are GMT +1. The time now is 11:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"