ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to add new row to table in Excel 2003? (https://www.excelbanter.com/excel-programming/439422-how-add-new-row-table-excel-2003-a.html)

oli merge

how to add new row to table in Excel 2003?
 
Hi,

I am designing a spreadsheet in Excel 2007 but trying to keep it backwards
compatible with 2003.

I have a table which a user will enter data in which I wanted to link to two
buttons which will either add a row to the bottom (labelled insert row) or
delete the selected row (labelled delete row).

I have only got as far as inserting a row so far. The code:

"Range("G35").Select Selection.ListObject.ListRows.Add AlwaysInsert:=False"

works in 2007 but not 2003 and I cant seem to work out the equivilent code.
When I tried recording the action of tabbing down the table to create a new
row in Excel 2003 it just cycled back to the top of the table and didnt add a
row.

I am on a very tight schedule to produce this spreadsheet so any help here
would be great, with the deletion of current line as well as this problem.

Thanks!

Homey

how to add new row to table in Excel 2003?
 
Excel 03 not have AlwaysInsert parameter. take it out and your ok.

"oli merge" wrote in message
...
| Hi,
|
| I am designing a spreadsheet in Excel 2007 but trying to keep it backwards
| compatible with 2003.
|
| I have a table which a user will enter data in which I wanted to link to
two
| buttons which will either add a row to the bottom (labelled insert row) or
| delete the selected row (labelled delete row).
|
| I have only got as far as inserting a row so far. The code:
|
| "Range("G35").Select Selection.ListObject.ListRows.Add
AlwaysInsert:=False"
|
| works in 2007 but not 2003 and I cant seem to work out the equivilent
code.
| When I tried recording the action of tabbing down the table to create a
new
| row in Excel 2003 it just cycled back to the top of the table and didnt
add a
| row.
|
| I am on a very tight schedule to produce this spreadsheet so any help here
| would be great, with the deletion of current line as well as this problem.
|
| Thanks!


Don Guillett[_2_]

how to add new row to table in Excel 2003?
 
I don't quite understand about your labeling.
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"oli merge" wrote in message
...
Hi,

I am designing a spreadsheet in Excel 2007 but trying to keep it backwards
compatible with 2003.

I have a table which a user will enter data in which I wanted to link to
two
buttons which will either add a row to the bottom (labelled insert row) or
delete the selected row (labelled delete row).

I have only got as far as inserting a row so far. The code:

"Range("G35").Select Selection.ListObject.ListRows.Add
AlwaysInsert:=False"

works in 2007 but not 2003 and I cant seem to work out the equivilent
code.
When I tried recording the action of tabbing down the table to create a
new
row in Excel 2003 it just cycled back to the top of the table and didnt
add a
row.

I am on a very tight schedule to produce this spreadsheet so any help here
would be great, with the deletion of current line as well as this problem.

Thanks!



oli merge

how to add new row to table in Excel 2003?
 
Thanks for the answers both, very helpful.

Homey's suggestion worked and I was able to add a line to the bottom of my
table/list (I think its called a list in 03 and is a table in 07?).

Deleting was suprisingly straightforward too, just a case of

"Selection.Rows.EntireRow.Delete"

to delete the selected row.

Thanks!



All times are GMT +1. The time now is 09:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com