+ Reply to Thread
Results 1 to 4 of 4

Declare variables in Classes

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    Philippines
    MS-Off Ver
    MSO 2013
    Posts
    15

    Declare variables in Classes

    Hi Everyone,

    Just wanting to ask why it seems not possible to declare variables in Class modules like so:


    Please Login or Register  to view this content.

    Thanks in advance.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Declare variables in Classes

    The variable declaration works fine for me if I replace VarType_A with a built-in data type.
    If posting code please use code tags, see here.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Declare variables in Classes

    Hello exceltabz,

    The VarTypeA must already be defined before it can be assigned to another variable or object.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    10-12-2012
    Location
    Philippines
    MS-Off Ver
    MSO 2013
    Posts
    15

    Re: Declare variables in Classes

    Thank you both for making me realize that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to declare variables
    By nav505 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2013, 01:25 PM
  2. Why declare variables
    By tryer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2009, 12:03 PM
  3. Array variables in classes
    By Tomski in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-19-2007, 11:53 AM
  4. [SOLVED] declare Variables
    By Lee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2005, 05:05 PM
  5. declare variables in this code??
    By bondcrash in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-02-2005, 11:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1