Same Macro on duplicated sheets

Siru33

New Member
Joined
Oct 15, 2021
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
Hi,
I am having quite a time figuring how to make this work..
I have a Sheet with a very big table data base with several columns. The table is basically a budget calculator for my engineering projects. I ve created some buttons with recored macro for easier (one click) filtering. All works fine till I duplicate the sheet for the next project I want to budget.
I understand that the problem is that all my macros reference the name of the table with list.object and when a the sheet is duplicated the name of the table is automatically updated.
Is there a way to created a button that duplicates my sheet and automatically update the new table name across all my macros ?
If not, what is the best way to resolve this problem ?

I am quite new to this and I am sure there is a easy way to do it.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi & welcome to MrExcel.
Do you only have the one table on the sheet?
 
Upvote 0
In that you can use .ListObjects(1)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,587
Messages
6,120,405
Members
448,958
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top