class module

  1. A

    Retrieve multiple values using VBA from dictionary

    Hi, Long time lurker, first time poster and VBA newb so bear with me. I am looking for a way to automate some reports that are currently done manually. Sheet1 contains a list of WO numbers in Column C. Sheet2 contains a list of potential matching WO numbers in Column A. Looking to take the WO...
  2. A

    Change Event for Multiple Check Boxes

    I have 25 text boxes named in the following manner on a UserForm Name: id_[X]_box 1<= x <= 25 I am trying to write a program which can register a change event for all 25 boxes and populate the corresponding [DESCRIPTION] Labels. Naming scheme for Description Labels Name: desc_[X]_label 1 <= X...
  3. R

    Simple Class module example required

    Help Can anyone provoide me with a very simple Class module example that captures for example peoples first names in column "A", Surnames in column "B" and loops through that column and adds them to a collection. I think if i had a bog standard example i might actually get it! Then I can build...
  4. SharmaAntriksh

    Excel Class Modules

    I have tried to create class module that accepts range i want to know if there is a way to expand this and create custom properties for that range object? Code in the Class Module "cRange": Option Explicit Private pRange As Range Public Property Set MyRange(r As Range) Set pRange = r...
  5. Tim_Excel_

    Workbook_SheetChange event loses reference to Workbook

    Hi forum, I have a Workbook_SheetChange event for another workbook (other than the workbook that holds the code). At the end of a lengthy Sub, I call for the Sub that defines the Workbook's name that the event needs to work for: Sub step1() '''''code'''' NameGrabber.DefineWorkbookName End...
  6. S

    Object Variable Not Set - Class Module inside Class Module

    I'm trying to assign a Class Module known as Port to part of another Class Module , here's the code so far: The port class module is as follows Private pName As String ' Properties Public Property Let Name(Value As String) pName = Value End Property Public Property Get Name() As String...
  7. M

    VBA- adding custom properties to Label controls

    Hi, I need to assing some properties to my labels which are generated on runtime (on a Class Module). I am using their TAG and Controltiptext properties, I need some more proterties to set and control these labels during the runtime. I am not sure If i should use some property procedures. If...
  8. M

    Access a Friend function in a Class module from a standard Moldule

    Hello. I´m trying to make my procedure faster, which starts with reading a few MB txt file line by line and by checking for the presence of a string in each line. For testing I downloaded this code, which is ought to make the InStr search much faster...
  9. F

    Class module for checkboxes

    I have a class module set to encompass ALL checkboxes on sheet, so that when any of them are clicked, a sub will run to populate some cells. It works great, but I'm having some trouble because I still want to group some of the cells together to create a user form. I'll have tons of checkboxes...
  10. N

    How to use Class Module for looping

    Hello MrExcel, Some website mentioned that using "Class Module" can make our code more clean. I also want to try it that way. I have create a class named "Car" which contain 3 main properties. Price+Color+Size. In another worksheet, i have table for each car which each of them contain...
  11. N

    Multi userform validate for textbox,Checkbox,optionbutton is not empty using class module codes

    Hi All, I have design & build 9 to 10 userforms. I need to validate each user-form's Textbox and optionbutton,Checkbox are selected or not if its not selected then code should be stop. To every userform i have put below code to validate Textbox optionbutton,Checkbox are selected Private Sub...
  12. T

    Want Know class module some asks...

    Hi guys I want some issue I make a class module with excel application I want module1= dim class as class module class module= 1) when cell duoubleclick 2) userform.show 3) before form close input a value to cell 4) form close next time 1-2-3-4... but... 1) when cell duoubleclick 2)...
  13. M

    Excel Class Module Implementation (Basic Level)

    Hello good people, I had a problem that I found the answer for, but it says "This code needs to be posted in a class module and an instance of the class needs to be created before it will work". I am very familiar with "Modules" but never used Class Modules before, and can't seem to be able to...
  14. M

    Class Module for ComboBoxes AND OptionButtons. Seeking advice: How to include both?

    Hello all, I come as a novice seeking advice from the amazing minds I see here! Guided by this code: ' Class module named TBClass Public WithEvents TBGroup As MSForms.TextBox Private Sub TBGroup_Change() MsgBox TBGroup.Name & " changed" End Sub ' UserForm module Dim TBs() As New...
  15. X

    Optional Arguments in Properties of a Class

    I have a class for a cylinder and i want the user to have the option not only to read the volume of the cylinder but to write the volume and preserve the height, radius or proportion by user's choice. I'm with this code for that condition: Public Enum PreserveRelationType PreserveRadius = 0...
  16. F

    Form events using set property

    Hi! I'm trying to assign events to the text- and comboboxes in a userform. It works fine as long as I just add one of the control types (TextBox or ComboBox), or assign each control to a different property name.The problem occurs when I'm assigning both Textbox and ComboBox to the same in...
  17. D

    VBA Creating a Collection in a Class Module

    Hi this is my first time posting on this forum so I hope I am putting this in the right place. I am currently reading MrExcel's "VBA and Macros: Microsoft Excel 2013" and I am having trouble understanding a section in chapter 9 called "Creating a Collection in a Class Module". Earlier in the...
  18. D

    VBA and Macros 2013 - Creating a Collection in a Class Module

    Hi this is my first time posting on this forum so I hope I am putting this in the right place. I am currently reading MrExcel's "VBA and Macros: Microsoft Excel 2013" and I am having trouble understanding a section in chapter 9 entitled "Creating a Collection in a Class Module". Earlier in the...
  19. S

    Listview add at run time with class module for event handling

    I'm having problems deploying a vba project on PCs throughout my organisation due to differences in windows configurations (I think). I have checked that MSCOMCTL.ocx is available on each PC and the listview control is available in the form controls menu (tools). As a side note, when I tried...
  20. 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...

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