Results 1 to 3 of 3

Thread: defined a combo box by procedure ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Posts
    92
    defined a combo box by procedure ?
    Hii

    how can i defined the combobox items by procedure in the load time ?
    i try this one and it isn't work :


    Public Sub init(comboname As ComboBox)

    comboname.AddItem "Custom_qa"
    comboname.AddItem "S0scripts"
    comboname.AddItem "S6web02"
    comboname.AddItem "D6web02"
    comboname.AddItem "D1web02"
    comboname.AddItem "D6web01"
    comboname.AddItem "s1web01"
    comboname.AddItem "s1web02"
    comboname.AddItem "S6secure"
    comboname.AddItem "S1secure01"
    End Sub

    and I call to the procedure :

    init (combowebservewrname)

    help pls !




  2. #2
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    I suspect you are getting a "type mismatch" error. This is due to the syntax of your call statement. Your call statement should be either:

    Init combowebservername

    - or -

    Call Init (combowebservername)

    The way you had it, combowebservername would be passed as an expression (VB would pass the Text property of the combobox to the procedure), instead of a combobox object.
    Calling it the way I indicated above will pass it as a combobox object.
    "It's cold gin time again ..."

    Check out my website here.

  3. #3

Posting Permissions

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



Click Here to Expand Forum to Full Width