collection

  1. N

    Public Object loses scope in another module??

    Hello, I confess I am relatively new to classes. I have declared an object variable at the top of module A thus: Public Teams As Collection The object is created in a procedure called "Create_Objects", also in module A: Set Teams = New Collection Without going into too much detail...
  2. N

    Object in Array Creation Problem

    Hello, I'm experimenting with a more object oriented approach. The code below is supposed to create a set of objects for match fixtures. aoTeam() stores an array of team objects without problem. A game object has two objects attached - .HomeTeam and .AwayTeam. When I come to set the home...
  3. B

    Transferring values to another workbook

    Sorry I meant sheet not workbook Hi I have 1 workbook, example, I have 1 sheet named 'Calls', in cell C4 a value will be entered for example '1 day' I have another sheet on the bottom 'Collection' I want it to log/copy '1 day', from A1. But I still want this info to remain on 'Collection'...
  4. K

    Excel 2010 count if

    Hello all, I am wanting to count cells that meet criteria in a sheet (data). The Data sheet, column A contains, DD-MMM-YY and column H contains different text, xxx, yyyyy,zzz for example. I wish to count how many xxx (column H) are in specific month and year (e.g. Jan-14 using the info from...
  5. B

    Filtering by using collection as criteria is practical ??

    Hi, Im trying to use autofilter to filter in columns by using the values that are stored in an array or collection as criteria . I already know it is ok with array but when ım trying that with collection I couldnt achieve my aim so far and ım just wondering it is possible or not ? Im sharing...
  6. MrKowz

    Class Collections - How do I set the key?

    Wracking my brain on this one. I have a class module which is populating various attributes of a list and is storing them in a collection. The collection is being built just fine, but I'm unable to figure out why the heck the collection key isn't working, despite me explicitly defining it...
  7. skacutter

    collection values to a single cell

    I have a collection in VBA of file paths. I need to record each value in the collection to a single cell with each value on a new line in the cell. Possible???? existing code Dim colFiles As New Collection If ListBox3.ListCount > -1 Then For i = 0 To ListBox3.ListCount - 1 UserChanges =...
  8. X

    Compile error with collection

    I have a sub whereI declare and set a collection (Cat_colw) which consists of a number of 3x3 arrays.<o:p></o:p> I have a set ofvariables (gp1,gp2,gp3,…) that represent a 3x3 range of cells.<o:p></o:p> I use thestatement: gp2.Value = Cat_colw(1) , to enterthe values of the array Cat_colw(1)...
  9. F

    Collection subscript error 9 used in a For/If loop

    Hey guys, I'm trying to manipulate 2 collections in my code. After comparing the difference between 2 values I need to remove those that are less than a set number. However, I run into a "Run-time error '9': Subscript out of range." I've pulled out the relevant sections from my main code to...
  10. J

    How to use regexp and arrays to match groups or sets of 3 individual patterns?

    Sorry if this get's duplicated, tried to post, but wasn't logged in and then auto redirect didn't go anywhere, so went back and trying again... Hey all, I'm new to Reg exp and I'm going to try to use it in Outlook... I know this is an Excel forum, but there are so many super smart and helpful...
  11. J

    Exclude One Textbox from a Collection of Controls

    This shouldn't be hard, but it's giving me fits. This code is working well and I'm creating a collection of textbox controls so that I can detect changes on the userform (to prompt a user to save their work). I want to EXCLUDE one textbox (that I'm using as a search feature) from the...
  12. A

    Collect 500 rows of data daily from 200 users

    Hi, I need your creativity! Problem: I work in a support team in a company where we receive approximately 500 orders per day from approximately 200 users in the company. Currently, these 200 users will either call or e-mail to place their orders. We use approximately 2.5 full time people to...
  13. B

    Assign all controls to my collection or group on runtime

    Hi All, i'm trying this all day so now it's time to ask the experts. I think i'm close but not sure.... I have a userform with 6 lines. Each line contain some controls like textboxes, commandbuttons and comboxes. With a press of a button i can create a new line of controls underneath them. All...
  14. G

    Need help creating a Collection of Combo/Text Boxes on a userform

    Hi all, I have a userform which is being built as a calulation tool I have a combo boxes and text boxes that are dependant on each other, once filled in there is a button that should calculate a range of values dependant on 1.) The value in the text box 2.) The selection in the corresponding...
  15. K

    Display full text of selected dynamic combobox in textbox

    Hello again folks, I have a quick question. I currently have a multipage userform that populates dynamic comboboxes within a frame on a button click. I was thinking about having a textbox on the same page that will display the full text of the active combobox in the textbox when it is clicked...
  16. B

    Advice on Approach: Collection, Array or Scripting Dictionary?

    Hello, I'm fairly new to VBA, but am becoming more proficient each day. I wanted some advice on the best approach to collect, aggregate and print out data from this sample workbook. (if you would prefer me to post the workbook another way- please advise. No macros or anything in this workbook)...
  17. G

    Getting RunTime Error 1004

    Hi, I am trying to make a collection of rows and columns on a successful search of the text found. While executing the code I get a run time error message "Run-time error '1004' Application Defined or object defined error". Code is as followed: Function getValuesToSort() As Collection Dim...
  18. 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...
  19. 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...
  20. D

    Custom Collection, dynamic width?

    I have a custom collection consisting of 3 components, the 3rd component will have a varying number of elements. To make it visible, column A and B will always be the first 2 elements in my variant array. Column C and potentially D,E,F are all of 3rd component "type". I'm at a loss as to how...

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