Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Browse Site by Tags

Showing related tags and posts accross the entire site.
  • Re: Class variable default value

    If you have Private i as Integer; In your class (not in a function), you can use the 'Class_Initialize' function to set the variable. You would do this like so: Private Sub Class_Initialize() i = 5 End Sub
    Posted to VBA (Forum) by Pgmer on Wed, Apr 16 2008
  • Class variable default value

    Hi How am I able to assign a default value to a variable in a class module in VBA? For example in VB.NET I can use this declaration: Private i as integer = 5 to set the variable's default value to 5. I want each new instance of the class to have the property Class1.i = 5 thank you!
    Posted to VBA (Forum) by lecxe on Wed, Apr 16 2008
Page 1 of 1 (2 items)
Copyright Excel User Group and the relevant contributors, 2008. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.