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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,318
Office Version
  1. 365
Platform
  1. Windows
I assume you have taken the button from the Control Toolbox toolbar?

Try using one from the Forms toolbar instead.
 

whr4th

New Member
Joined
Nov 8, 2004
Messages
20
That worked perfectly. I knew it was simpler than I was making it.

Thanks!
 

Forum statistics

Threads
1,148,229
Messages
5,745,483
Members
423,953
Latest member
MrC54

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
Top