Macro returns Argument not optional error

tigerdel

Board Regular
Joined
Oct 13, 2015
Messages
145
Office Version
  1. 365
Platform
  1. Windows
I have call code for a button added to a new custom ribbon
Code:
Sub Raw_Data(control As IRibbonControl)
Call Raw_Data
End Sub

This supposed to run a macro called Raw_Data when the icon is clicked
However this returns Argument not optional error

Any help would be greatly appreciated
 
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi there

Are you calling Raw_Data or Raw_Date...
 
Upvote 0
Did you edit your first post? I though I saw you said Raw_Date in the line This supposed to run a macro called Raw_Data when the icon is clicked...🙈🙈
 
Upvote 0
Did you edit your first post? I though I saw you said Raw_Date in the line This supposed to run a macro called Raw_Data when the icon is clicked...🙈🙈
Yes I did - when you asked your question I realised that there was an error in what I had typed
 
Upvote 0
Ok thanks...

What about...

VBA Code:
Sub Raw_Data(control As IRibbonControl)
Call Raw_Data()
End Sub
 
Upvote 0
Don't use the same name for both routines. Change one of them.
 
Upvote 1
Solution

Forum statistics

Threads
1,215,486
Messages
6,125,070
Members
449,205
Latest member
Healthydogs

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