|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Proper syntax for Sub?
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 ![]() |
|
#2
|
|||
|
|||
|
As I can see - you forgot to write a dot in your 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 May be it will help you? Good Luck! __________________________ With best regards, Julia Pavlova Programmer Rapid Internet Development AlarIT Inc. URL: http://www.alarit.com |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Proper syntax for Sub? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|