Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Insert New Line
Beginner Hi! I have a form that enters new information from the user into a spreadsheet. However, i want a new row added automatically everytime a new record is added. Is this possible to add a row using VBA code? Thanks in advance -- Clare ------------------------------------------------------------------------ Clare's Profile: http://www.excelforum.com/member.php...o&userid=36047 View this thread: http://www.excelforum.com/showthread...hreadid=558384 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Insert New Line
right click sheet tabview codeinsert thismodify to suit
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 6 Then Exit Sub Rows(Target.Row + 1).Insert Rows(1).Copy Rows(Target.Row + 1) End Sub -- Don Guillett SalesAid Software "Don Guillett" wrote in message ... use a worksheet change event that adds the row when the last field in the current row is filled in. -- Don Guillett SalesAid Software "Clare" wrote in message ... Beginner Hi! I have a form that enters new information from the user into a spreadsheet. However, i want a new row added automatically everytime a new record is added. Is this possible to add a row using VBA code? Thanks in advance -- Clare ------------------------------------------------------------------------ Clare's Profile: http://www.excelforum.com/member.php...o&userid=36047 View this thread: http://www.excelforum.com/showthread...hreadid=558384 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Insert New Line
Don This is the code I have, and i want this to either be added in a new row (as there is other information below this line) or add a new row after the form adds the information to the spreadsheet? Private Sub CommandButton1_Click() ActiveWorkbook.Sheets("Jobs").Activate Range("B7").Select Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True ActiveCell.Value = Job_No Range("B7").Select End Sub -- Clare ------------------------------------------------------------------------ Clare's Profile: http://www.excelforum.com/member.php...o&userid=36047 View this thread: http://www.excelforum.com/showthread...hreadid=558384 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Insert New Line
I'm still not quite sure what you want to do.
Do you want to add a row before or after b7? Range("b1").End(xlDown).Row+1 'finds next row cells(rows.count,"b").end(xlup).row+1'finds lastrow +1 -- Don Guillett SalesAid Software "Clare" wrote in message ... Don This is the code I have, and i want this to either be added in a new row (as there is other information below this line) or add a new row after the form adds the information to the spreadsheet? Private Sub CommandButton1_Click() ActiveWorkbook.Sheets("Jobs").Activate Range("B7").Select Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True ActiveCell.Value = Job_No Range("B7").Select End Sub -- Clare ------------------------------------------------------------------------ Clare's Profile: http://www.excelforum.com/member.php...o&userid=36047 View this thread: http://www.excelforum.com/showthread...hreadid=558384 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I insert a line feed in the text in an EXCEL cell? | Excel Discussion (Misc queries) | |||
auto insert blank line | Excel Discussion (Misc queries) | |||
Insert each line in a new row | Excel Discussion (Misc queries) | |||
Insert Line Macro | Excel Discussion (Misc queries) | |||
How do I insert a line break when using the CONCATENATE function? | Excel Worksheet Functions |