I have an editBox on an Excel File where I want to display a date that is stored in a named cell on a specific worksheet. I want this value to be displayed when the Excel file is opened.
Here's the ribbon XML line:
<editBox id="editBoxSDate" label = "S Date" onChange = "onChange_SDate" getText = "getText_SDate"/>
Here's the getText_SDate function:
Public Function getText_SDate(ByRef control As Office.IRibbonControl) As String
getText_SDate = CStr(wksSettings.Range("SettingsSDate"))
End Function
When I open the file and click on my custom Ribbon tab, I get the following error message: Wrong number of arguments or invalid property assignment
What am I missing or doing wrong?
Either change the name of the
Functionor thegetTextcommand to match, actually they do not match, i.e.:getText_Datevs.getText_SDate