Forum Discussion

krestenbager's avatar
krestenbager
Occasional Contributor
15 years ago

VB: possible to define an optional parameter in a sub?

Hi all,



In VB it should be possible to declare a sub procedure with an optional parameter, e.g.:

Sub notify(ByVal company As String, Optional ByVal office As String = "QJZ")



I know that the 'As String' won't work but something like;

Sub notify(company, Optional office = "QJZ")

should work?!?



But this fails in TestComplete (7.52.678.7).

Must all parameteres in TestComplete be required?



Thank you!

Best regards

Kresten Bager