Hi All,
Not sure if this next task is possible or not?
I have a command button which copies a hidden master sheet to create a new customer worksheet. On this new sheet there is a table (Scope) of personal information, purchase information and formulas.
There is another command button which adds a new line to the table (a new purchase record) which works perfectly (code below) but when I add a new sheet for another customer, the code doesn't work as the table (Scope) is renamed each time on the new sheet.
Private Sub AddRow_Click()
ActiveSheet.ListObjects("Scope").ListRows.Add AlwaysInsert:=True
End Sub
Any ideas how to get around this?
Can this be done without creating a table (Just a range) and by inserting a new line at the bottom of the Range, but only copy and paste the formatting and formulas?
or can this be accomplished by changing the VBA code to modify the Tables name (Scope) to match the new Table name created for the new sheet?
I hope this is explained sufficiently.
Thank you