I need some help with inserting and deleting rows in a table using vba in excel

Now it won't let me convert to a range. I am selecting the table, right clicking on a cell but it doesn't give me the option.
 
I moved the formulas then made another table. It still gives me the same error. When I have a cell within the table selected, the table tools menu item won't even show up.
 
so it isn't registering as a table.
 
This is driving me nuts! I went to an earlier version of the file where the table tools did show up but when ever I select it make it into a range and add in just the I to the new table, it gives me the same error.
 
This is the row that is highlighted:


Set tbl = ws.ListObjects("Costing")


Is there anything wrong with this line as my table is called Costing, so I have no idea??
 
Your delete code has Table3 ?
I have no idea as to whether it is case sensitive. I am sure sheet names are not?
Anyway try that.


Code:
Set rng = ActiveSheet.ListObjects("Table3").Range


When I try and run it and press the add button row, this is the line that has the error:


Set tbl = ws.ListObjects("table3")


It says run time error 9, subscript out of range.
But that doesn't make sense as my table is set to table3??
 
I found out what I should do. I just included the long formula in the cell in F7 so it updates correctly now.

Yay

Now I just need a way to ask for confirmation before deleting a row if the row has text in it...
 

Users who are viewing this thread

Back
Top Bottom