![]() |
Class Modules
Can you create a Class Module using VBA without using the Property Lets and
Gets??? Can you instead just Publicly declare the Class Module? If so....does anyone have a full example from the creation of the class module through creation of the code for the Regular code module??? I would appreciate it Than k you |
Class Modules
Lets and Gets and just the write/read specific properties. If you just
declare a public variable, that effectively becomes a read/write property. In summary, yes you can. Here's a very simple Class Public myVar Public Function myMethod() As Long myMethod = myVar * 5 End Function and this is the class invoked in a normal module Sub test() Dim myClass As Class1 Set myClass = New Class1 With myClass .myVar = 17 MsgBox .myMethod() End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ibeetb" wrote in message ... Can you create a Class Module using VBA without using the Property Lets and Gets??? Can you instead just Publicly declare the Class Module? If so....does anyone have a full example from the creation of the class module through creation of the code for the Regular code module??? I would appreciate it Than k you |
All times are GMT +1. The time now is 11:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com