I am getting a strange error when I try to build my solution. The error occurs when I am calling the oGetHeaderValue function and passing the parameters.
Dim oGetHeaderValue As New clsGetHeaderValue
Dim returnString As String
returnString = oGetHeaderValue(strInvoiceNumber, strOrderNumber)
The error message is: Class ‘clsGetHeaderValue’ cannot be indexed because it has no default property.
You’re calling your instance
oGetHeaderValueas if it’s a method. It looks like you probably meant to call a function on it instead but missed out that bit.So maybe your code should be:
Where
YourMethodis whatever method you wanted to call.And just to clarify after reading your question again,
oGetHeaderValueis not a function, it’s an instance of a class that might contain functions and subs etc.