Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello VB fiens... How can I bypass an empty cell in a row when trying to add a row? Scenario: I created a userform to input data into excel worksheet. Data will be added...nextrow..nextrow.. One row may contain 2 empty fields resulting empty field to be next row to append. this is sample code for procedu Nextrow = _ Application.WorksheetFunction.CountA(Range("A:A")) + 2 Cells(Nextrow, 1) = txtfast.Text thanks in advance for your help & enjoy life!! myrna *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Myrna,
Here's an example of what I use.... Private Sub CommandButton1_Click() ' assuming it's the OK button on the userform With ActiveSheet() 'This macro gets the first empty cell in the active sheet. [A65536].Select Selection.End(xlUp)(2).Select ActiveCell.Value = Date ActiveCell.Offset(0, 1).Value = ComboBox2.Value ActiveCell.Offset(0, 2).Value = ComboBox3.Value etc.... Just make sure there'a always something to be entered in the Column A. Personnally, I always enter todays's date. But you may want to enter an X in the cell, and hide the column... I hope this helps... Bonne journée Denys -----Original Message----- Hello VB fiens... How can I bypass an empty cell in a row when trying to add a row? Scenario: I created a userform to input data into excel worksheet. Data will be added...nextrow..nextrow.. One row may contain 2 empty fields resulting empty field to be next row to append. this is sample code for procedu Nextrow = _ Application.WorksheetFunction.CountA(Range("A:A")) + 2 Cells(Nextrow, 1) = txtfast.Text thanks in advance for your help & enjoy life!! myrna *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks Danys for your help!
Still having a problem validating empty cell to add next row. When I run OK button, I need to be able to add row even if empty cells exist in previous row. For Example: col A B C row 1 red blue green 2 red blue 3 If C2 is empty, I need to skip over empty cell and go to next row 3. any suggestions?? thanks *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
To find row is empty or not | Excel Discussion (Misc queries) | |||
Find first empty row | Excel Discussion (Misc queries) | |||
find the next empty row | Excel Discussion (Misc queries) | |||
find last none empty cell | Excel Discussion (Misc queries) | |||
Find Empty Cell | Excel Programming |