+ Reply to Thread
Results 1 to 4 of 4

vba class module

  1. #1
    Registered User
    Join Date
    09-25-2013
    Location
    Castle Combe
    MS-Off Ver
    Excel 2007
    Posts
    2

    vba class module

    OK...I'm stuck!

    Ive never really had to use class modules before, so still getting to grips with them. I am trying to build the class module to manage the controls on a form. I have a set of text boxes working so I'm hoping I am grasping the concepts, however the problem I have is that frame doesn't generically have either Enter or Exit events when used within a class. These I require and so I have elected to build them.

    So I have had to build a class module with added events and then trigger the events using a RaiseEvent command. This I can make work when only 1 instance of the class, however since vba doesn't allow you to dimensionalise an array as a class object I have had to use a collection. The standard events that are contained within the class work perfectly well...however the RaiseEvent doesn't. I can but assume that the events in the main form relate to a different instance so aren't being triggered.

    Does anyone out there know a way around this?

    Please Login or Register  to view this content.
    Last edited by Jonty-R; 07-20-2017 at 12:03 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,914

    Re: vba class module

    Welcome to the forum!
    Last edited by AliGW; 07-20-2017 at 12:04 PM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    09-25-2013
    Location
    Castle Combe
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: vba class module

    Thank you for the welcome Edited

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,914

    Re: vba class module

    Thanks. I've edited my post, too.

+ 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. Place code in userform, module or class module
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2017, 07:04 AM
  2. [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
  3. Replies: 1
    Last Post: 08-30-2011, 02:23 AM
  4. Class Module
    By Bill Martin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-25-2006, 05:00 PM
  5. Module vs Class Module
    By DCSwearingen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2006, 07:45 PM
  6. [SOLVED] Class Module & Module
    By Liedson31 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2005, 11:05 AM
  7. [SOLVED] Class module
    By Avner Mediouni in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-19-2005, 11:06 AM

Tags for this Thread

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