Deleting leftover sub after deleting the Command button

whr4th

New Member
Joined
Nov 8, 2004
Messages
20
This should be easier than I am making it. I have a spreadsheet in one workbook that has a button that activates a macro that copies the tab to a new workbook and saves it. The new workbook only has the one tab in it and, to clean up the sheet, I deleted the leftover button (since it won't work anyway). But, when you open the new file, you still get the Disable/Enable macro pop-up box.

There is no Module attached to the new worksheet. All that is left is the following code which is embedded under the Microsoft Excel Objects under the sheet name:
Private Sub CommandButton1_Click()
Export_Sheet
End Sub

I have verfied that by manually deleting the offending code, upon reopening the spreadsheet, I no longer get the pop-up box.

I am trying to deliver the new spreadsheet to the end users without the command buttons (which I have done) and without the starting Disable/Enable pop-up.

Thoughts anyone?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I assume you have taken the button from the Control Toolbox toolbar?

Try using one from the Forms toolbar instead.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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