Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm trying to add controls to a controls collection of a form by doing this:

 

Dim oADMvtrlColl as frmAdmin.Controlscollection '*** make an instance of the ctrlcollection of the admin form.

 

in an input form I try to add a controls dynamically by doing this:

oADMctrlColl.add(cbobox) '** Combo box has been created dynamically

 

But the error : object reference not set to an instance of an object

 

What am i doing wrong

 

Cire

Trust the Universe
Posted

No because the combobox is on a different form.

 

I have a combobox input form frmCBInput and from that form I have to add a combo box with values to the frmAdmin form in a specific location.

 

Cire

Trust the Universe
Posted

When I add Byval f as frmMain to the parameter of the btnOK_click event of the frmLBInput form the last part of the line "Handles btnOK.click" gets an error.

 

Method 'btnOk_Click' cannot handle Event 'Click' because they do not have the same signature.

 

Where does the "Byval f as frmmain" need to go??

Trust the Universe

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...