class module

  1. J

    Get variable value in userform from Class module

    I want to monitor when a value changes of several combo buttons on a user form. I have set this up using a class module to capture all the comboboxes on the userform. I have the following code in a class module called “ModComboClass”: Public WithEvents ComboGroup As MSForms.ComboBox Public Sub...
  2. D

    VBA - On_click event with userform checkoxes

    Hi, I'm having some difficulties with some code that I cant quite piece together. I have a Userform which allows a user select a desired parameter from a listbox. Depending on the user's selection a set of checkboxes are created in a neighbouring frame. The checkboxes are iterated and produced...
  3. J

    class module for multiple commandbutton click event

    I have a user form with 50 rows each containing the controls in order as: Togglebutton101, Togglebutton1, Textbox301, Checkbox1, Textbox1, Combobox1, Combobox101, Checkbox101 and a Commandbutton1. What I want to do is when I click the commandbutton1 then its preceding controls in its row...
  4. P

    Understanding Class Modules vs Modules

    Hi, I'm just wondering if someone can explain in simple terms the difference between a Class Module and a Module. Are they used differently in Excel VBA? Thanks! Tricia :eeek:
  5. H

    VBA Help Needed - Class Module for CommandButton

    Hey Everyone, I am trying to create Minesweeper in excel (to increase office productivity). I am already pretty good with VBA so creating it in a worksheet would be a cakewalk for me, so I am trying to create it in a user form.I also want to learn how to get better with class modules, which...
  6. S

    Excel :: Global Class Instance

    Hi, I’m new to VBA and especially how to use it in an OO way. My intention is to create a base class "myClass" with common methods to use within my Excel application. These methods should be available in userForms and other modules (global scope). Don’t know if it’s possible, but I would...
  7. H

    VBA - List all variable names and their values during run-time

    hi Everyone, Do you know how to list all the class module variables along with their "current" values during run-time? This is similar to lookup the variables on the watch panel during run-time, but I am trying to list all of them to a worksheet using VBA. Maybe I am not using a good enough...
  8. S

    Problem with Array inside a Class Module

    Hi, I have tried for a couple of hours searching and trying to get this work. I am pretty sure its an easy problem as well but I just cannot seem to work it out. Sorry if its trivial or has been covered before. This my class module: (clsUsers) Option Explicit Public UserName As String Public...
  9. V

    Array of Class Module Elements

    I am looking to store instantiated class module objects into an array. This seems as if it should be simple but I have had no luck. So if I had a class module called classPerson: Public name As String Public age As Integer In the macro: Dim person As classPerson Set person = New...
  10. S

    Assigning a dynamically created ActiveX Control to a class

    So I'm dynamically adding a series of ActiveX checkboxes to a worksheet. Each checkbox represents a given product and the set of products varies based on the market I select in a combo box drop down. I have a class module that should control what happens on the click event for each newly added...
  11. U

    storing data in VBA, maybe using arrays?

    I would like to store user input as an array. I'm using Excel 07 on a PC running WinVista. I'm making an application with UserForms. I want the user to be able to select a day on the calendar (works fine, no problem there), and then in a text box they can enter an item (I should be ok this...
  12. M

    Referencing other workbooks and using thier classes

    Hi, I have created a class module, and it works fine when I call from the VBA project in which I have written the class module. However, I would like to access my class, from other workbooks as well, so I have tried to reference the workbook through Tools -> References. Now I have access to...
  13. T

    Runtime Error 91 using custom class module

    Currently developing my first somewhat tricky spreadsheet application and I'm getting an error 91 which doesn't seem to bear any resemblance to anything google will find. I'm still pretty new to the whole visual basic thing and find the syntax a little alien (doesn't help if one is used to...
  14. Jaafar Tribak

    Persistent Application level Events after user resetting variables ?

    Hi all. Here is the deal - Suppose the application is hooked upon opening the workbook like so : Private WithEvents AppEvents As Application Private Sub Workbook_Open() Set AppEvents = Application End Sub Private Sub AppEvents_NewWorkbook(ByVal Wb As Workbook) MsgBox...
  15. Jaafar Tribak

    Challenging problem - Generic CommandButton Click Event w/o a seperate Class module !!

    Greetings all. Let me see if I can explain this clearly. Suppose I have a UserForm with 10 CommandButtons. Each CommandButton has the same code inside its _Click event handler. Now, because the Click event code for each CommandButton are the same ,we can, as you know, use a small Class...
  16. Jon von der Heyden

    Trapping outline expand / collapse

    I suspect I need a class module for this... How do I trap the event when a user chooses to expand / collapse outlines (columns in this instance) on a worksheet? Basicallly, when attempting to expand I want to prompt the user to enter a password and then unprotect the sheet. And if...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top