MarrowGenx
MIS
I am trying to accomplish the following, but can not get the code to work:
I have a set of comboboxes on a form named as follows:
cboTestYN
cboJunkYN
cboProcessYN
I want to set up a function that will take a variable as part of the name of the combo box I want to use and set the control or combobox equal to that variable. Here is what I have tried so far:
Private Sub Tester(LayerName)
Dim ComboBoxer As ComboBox
Set ComboBoxer = "cbo" & LayerName & "YN
End Sub
How can I change this code to make it work. After I set ComboBoxer, I would like to be able to set the visability and other things. This is on a much simpler scale that what I am trying, but hopefully I am getting my major point across.
If you have any suggestions, please let me know. Thanks.
Marrow
I have a set of comboboxes on a form named as follows:
cboTestYN
cboJunkYN
cboProcessYN
I want to set up a function that will take a variable as part of the name of the combo box I want to use and set the control or combobox equal to that variable. Here is what I have tried so far:
Private Sub Tester(LayerName)
Dim ComboBoxer As ComboBox
Set ComboBoxer = "cbo" & LayerName & "YN
End Sub
How can I change this code to make it work. After I set ComboBoxer, I would like to be able to set the visability and other things. This is on a much simpler scale that what I am trying, but hopefully I am getting my major point across.
If you have any suggestions, please let me know. Thanks.
Marrow