excel - VBA calling class let method, compile error -
beginner excel class modules here. having problem basics-
when set (let) property, "compile error: wrong number of arguments or invalid property assessment" .name
property:
sub test() dim acc business relationship set acc = new business relationship msgbox (acc.name("first account").rownum()) end sub
and "account" class module:
private straccname string private mlngrownum long public property allow name(strn string) straccname = strn end property public property rownum(exists boolean) dim rownum long '...some logic here... '... getrownum = rownum end property
so supposedly going wrong in allow method? advice appreciated
you can assign value property allow (for normal datatypes) or property set (for object) equal sign, not vith parenthesis (used method instead), or read property assigning value variable, this:
acc.name = "xyz" msgbox acc.name
excel vba excel-vba
No comments:
Post a Comment