Forum Discussion
erictengo
May 22, 2025Copper Contributor
Prevent Text Box from being copied to a new sheet .
Is it possible to add a text box to a sheet that cannot be copied when that sheet is copied to a new tab? In other words - I have a workbook with several tabs. Tab 7 is intended to be a change orde...
SnowMan55
May 22, 2025Bronze Contributor
I suspect that what Kidd_lp intended was to use the SheetActivate event, so you don't have to wait for a cell to be changed:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim txtBox As Shape
If Sh.Name <> "Tab 7" Then '...or whatever the name of the template worksheet is
For Each txtBox In Sh.Shapes
If txtBox.Name = "TextBox1" Then '...or whatever the nmae of the control is
txtBox.Delete
End If
Next txtBox
End If
End SubNot much more information is available in Microsoft documentation.
But I would be very concerned about sharing a macro-enabled workbook among employees. Discuss the security concerns with your IT staff.