Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto add new row
How setup auto add new row when click the box
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto add new row
click what box?
"IT" wrote: How setup auto add new row when click the box |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto add new row
Sorry ...
My Question as . I am update data in a field. After my mouse click move next field , the script will atuo insert new row ( included the formula). "Patrick Molloy" wrote in message ... click what box? "IT" wrote: How setup auto add new row when click the box |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto add new row
ok. here is some code. Right click on the sheet TAB and from the menu list
select 'View Code' Paste the code into the module that opens. The assumption is that the table begins at cell E9. When you enter anything in any cell, the CHANGE event fires. This gets the location on the bottom right cell (saved as lastrow, lastcolumn) . If the cell that changes has the same address, then the last row is replicated down...but not the last cell Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim lastRow As Long Dim lastCol As Long lastRow = Range("E9").End(xlDown).Row lastCol = Range("E9").End(xlToRight).Column If Target.Row = lastRow And Target.Column = lastCol And Target.Count = 1 Then Range(Cells(lastRow, "E"), Cells(lastRow, lastCol - 1)).Copy Cells(lastRow + 1, "E").PasteSpecial xlPasteAll End If End Sub "IT" wrote: Sorry ... My Question as . I am update data in a field. After my mouse click move next field , the script will atuo insert new row ( included the formula). "Patrick Molloy" wrote in message ... click what box? "IT" wrote: How setup auto add new row when click the box |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto-expand/rich auto-complete option in Excel combo boxes | Excel Programming | |||
Auto-populate, Auto-copy or Auto-fill? | Excel Worksheet Functions | |||
How to AUTO SAVE as opposed to turning on auto recovery: EXCEL | Excel Discussion (Misc queries) | |||
Auto Excel workbook close: save= false during an auto subroutine | Excel Programming | |||
excel links update not working in auto, calculations in auto | Excel Worksheet Functions |