![]() |
Append Below
I thought Excel 2003 had a function useable in VBA called "AppendBelow"
which allowed the addition of a new bottom line of data to an existing data range. but cant find it. If it exists what is the correct syntax based on the outline below. MyLine is the data to be appended My Range is the Named Range to append to Code??? AppendBelow(MyRange,MyLine) donwb |
Append Below
You probably has a macro in your personnel.xls file that got lost. This code will work Sub AppendBelow(MyRange As Range, MyLine As String) MyColumn = MyRange.Column Set LastRow = Sheets(MyRange.Parent.Name).Cells(Rows.Count, MyColumn).End(xlUp) LastRow.Offset(1, 0) = MyLine End Sub -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=154400 Microsoft Office Help |
Append Below
Thanks Joel, that works fine
donwb "joel" wrote in message ... You probably has a macro in your personnel.xls file that got lost. This code will work Sub AppendBelow(MyRange As Range, MyLine As String) MyColumn = MyRange.Column Set LastRow = Sheets(MyRange.Parent.Name).Cells(Rows.Count, MyColumn).End(xlUp) LastRow.Offset(1, 0) = MyLine End Sub -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=154400 Microsoft Office Help |
All times are GMT +1. The time now is 09:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com