Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Mar 2004
    Location
    Knoxville, Tennessee, USA
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Use Of Modules (VB6)

    To describe me as a programming novice is charitable so please bear with me if any of my questions expose my deficiencies in this area. I am an attorney not a computer programmer... a fact which will become painfully obvious below!

    I have found it very useful to use a Module to fill recurring ComboBoxes using "AddItem" throughout a very lengthy project. I simply insert the applicable code in "Form Load" as I have literally hundreds of forms using the same type of ComboBoxes. My question is, "can I use a similar procedure incorporating information in the Module for other tasks? For instance, because most of my textboxes are connected to certain database fields, they have data in them when the form is activated. I clear the data out by placing TextBox1.Text = "" for all textboxes. if I could tap the code just once in a Module and then recall it in "Form Load" I would say that a lot of time and memory. I hope this makes sense! Thank you in advance for your assistance!

    BobNichols

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Use Of Modules (VB6)

    > because most of my textboxes are connected to certain database fields, they have data in them when the form is
    > activated. I clear the data out by placing TextBox1.Text = "" for all textboxes.

    I don't know anything about your application, but if you do not need data from your database in those boxes, your program might be doing some unnecessary work that you could stop doing, rather than adding a step that undoes the earlier work. Just a thought.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •