+ Reply to Thread
Results 1 to 3 of 3

Accessing array in a class module

  1. #1
    Registered User
    Join Date
    05-30-2012
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    26

    Accessing array in a class module

    My operating system is Windows 7 Home Premium, using Microsoft Office 2010. I have created a string class module called clsTest, having 15 properties. I entered data to the class module through the following code which reads in the data, prints it to a scratch pad sheet, sorts it (I understand you can sort the array internally) using the scratch pad, prints the sorted array to another worksheet.
    All of the code works fine. My problem is I can't seem to get the array from the class module. I will be having several classes for various other string arrays and will need access to them for further manipulation and/or printing. I am a novice in working with class modules any help would greatly be appreciated.
    Please Login or Register  to view this content.
    Last edited by chipnputt; 01-09-2014 at 11:19 PM. Reason: code tags wrong format

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Accessing array in a class module

    Hi, please amend your [code/]Please Login or Register to view this content.[/code][/B].
    多么想要告诉你 我好喜欢你

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Accessing array in a class module

    Hi chipnputt ,

    When you say you can't get your values out of the class module it sounds like a SCOPE problem. Here is some info on Scope at:
    http://www.cpearson.com/Excel/Scope.aspx

    I'm not completely sure about Class Modules and how they fit in this big picture but I do know if you put code behind an individual sheet it can't be used to work on other sheets, without some tricks.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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] Sorting an array of a specific class module
    By MartinaLucilla in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-30-2013, 11:07 AM
  2. [SOLVED] Class module / multidimensional array?
    By swoop99 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-09-2013, 09:31 AM
  3. [SOLVED] ComboBox class .AddItem filled in class module
    By Jacques Grobler in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-03-2012, 05:48 AM
  4. Replies: 1
    Last Post: 08-30-2011, 02:23 AM
  5. accessing array of an userform from a Sheet/module macro code
    By stanigator in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2007, 09:34 PM

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