Macro help copy text box but keep the same textbox name.

esitze

New Member
Joined
Aug 24, 2018
Messages
18
Hi All,

Thanks for taking a look at this to see if you can help. I have the following macro in use and it works great. Only problem is after this macro creates my new sheet I have another formula in place that will not work because, when the new sheet is created the text box names change. Anyway to stop this??? The current macro is:

Private Sub CommandButton1_Click()
Worksheets("Towers Calc").Copy After:=Sheets(Sheets.Count)
shtname = InputBox("Enter Tower Equipment Number")
If shtname = ("") Then ActiveSheet.Name = "Tower"
If shtname = ("") Then Exit Sub
ActiveSheet.Name = shtname
End Sub

Thanks again!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
what text box? why do you need to copy the text box?
why not just use a cell? Every sheet has the same cell.
 
Upvote 0
What happens when you make a copy of a copy?

Do the names of things remain the same between the copy and it's copy?
 
Last edited:
Upvote 0
What is happening is that the copy process uses a default naming convention.
The original might have object names that come from different order of creation or user chosen names, but the copy process assigns names on its own plan. The first copy and its copy get their objects' names from the same default naming convention.

So, make a copy of your original. Fix the formulas. And then that copy will be your template page to be the source of all the other downstream copies.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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