Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by maxxia

  1. maxxia

    Events for a dynamic array of controls on a userform

    Sorry, I think the problem is that I'm using VBA and I'm coding a macro in Excel. I tried the code you suggested, but the compiler doesn't recognize the property "txt.OnChange"; otherwise, it would be a very good solution to my problem. I have to say, I'm a little surprised at this ...
  2. maxxia

    Events for a dynamic array of controls on a userform

    Thanks for the input... My problem is that the txt.OnChange property isn't recognized that way. The only way I know of to define an event for a given control is Sub ControlName_Change() 'code End Sub I have created a dynamic array of controls by creating an array of objects and then...
  3. maxxia

    Variable number of controls on a userform

    Thanks, Zemp, I'll try there.
  4. maxxia

    Events for a dynamic array of controls on a userform

    I'm trying to create an array of controls on a userform which are created at runtime, which I can then reference using an index number to define events. My problem is that I'm declaring a dynamic array of controls using: Dim textbox() As Object and then in the Initialization event for the...
  5. maxxia

    Variable number of controls on a userform

    Thanks Zemp. Just one more question: The way I've done it, I declare the dynamic array of Textbox controls as objects: Dim textbox() As Object and then add a new textbox control in the Initialization event with: Set textbox(c) = userform.Controls.Add("Forms.Textbox.1") so I can...
  6. maxxia

    Variable number of controls on a userform

    Thanks for all the help so far. . . maybe I just don't get it. . . I am able to create the array of controls, which are TextBoxes, at runtime. I need them to be dynamically created at runtime because the number of them is dependent on a variable integer. I can change properties for these...
  7. maxxia

    Variable number of controls on a userform

    Thanks, Rick, sounds good if I can do it. What is the syntax for creating an array of events? And once I have the event array, how can I write a For loop that will work when a particular one fires (given that there will be a variable number of them? Thanks again, Max
  8. maxxia

    Variable number of controls on a userform

    I'm trying to construct a userform that has fields which, when filled, form an equation. Each field is a separate part of the equation and the number of parts is variable, thus I've had to write code creating the necessary number of controls for any given equation. This I've written at the...

Part and Inventory Search

Back
Top