In a code Module (named ribbon)
Sub Form1Show(control As IRibbonControl) ' this is custom ribbon
Form1.Show ' works
End Sub
In ThisWorkbook module:
Private Sub Workbook_Open()
Call Form1.Show ' error: argument not optional
End Sub
Can somebody explain this?
Declare the parameter as optional; otherwise, it is required.
Sub Form1Show(Optional control As IRibbonControl)