I am working on a project that incorporates an activex control. I have a series of checkboxes that interact with that control.
Currently, I have a function for each checkbox, which seems a little silly. I am trying to reformat the Sub to accept two parameters, but am not having any luck.
Calling statement:
<INPUT type="checkbox" onclick="GenToggle('Office Locations', window.document.Form1.Office)" id="Office">Office Locations
Sub:
Private Sub GenToggle(layername,chkname)
Dim myMap
Set myMap = getMap()
If chkname.checked = True then
myMap.getMapLayer(layername).setVisibility(1)
myMap.refresh()
Else
myMap.getMapLayer(layername)setVisibility(0)
myMap.refresh()
End If
End Sub
Any help is greatly appreciated...
Toby
Currently, I have a function for each checkbox, which seems a little silly. I am trying to reformat the Sub to accept two parameters, but am not having any luck.
Calling statement:
<INPUT type="checkbox" onclick="GenToggle('Office Locations', window.document.Form1.Office)" id="Office">Office Locations
Sub:
Private Sub GenToggle(layername,chkname)
Dim myMap
Set myMap = getMap()
If chkname.checked = True then
myMap.getMapLayer(layername).setVisibility(1)
myMap.refresh()
Else
myMap.getMapLayer(layername)setVisibility(0)
myMap.refresh()
End If
End Sub
Any help is greatly appreciated...
Toby

