Macro not working properely

Zubair

Active Member
Joined
Jul 4, 2009
Messages
299
Office Version
  1. 2016
Platform
  1. Windows
Hi Experts,

I am getting following error while running macro. Run-time error '1004':

Unable to get the Add property of the Buttons class



Sub Macro3()
'
' Macro3 Macro
'

'
Sheets("Discount form").Select
ActiveSheet.Buttons.Add(448.8, 58.8, 101.4, 72).Select
Sheets("Discount form").Copy
Application.Dialogs(xlDialogSendMail).Show
End Sub


What I am trying to do is:

1. Record Macro
2. Right click tab "Discount form"
3. Select Move and copy
4. To book: (new book)
5. Tick Create a copy
6. Ok
7. In new book, File> Share > Email > Send as Attachment
8. Macro Stop

Note : Column O & P are hidden with password protected.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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