Discuss Proper syntax for Sub? in the ASP Programming forum on Dev Shed. Proper syntax for Sub? ASP Programming forum discussing Active Server Pages coding techniques and problem solving methods. Use VBScript or Jscript to make dynamic web applications.
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
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.
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
Posts: 17
Time spent in forums: < 1 sec
Reputation Power: 0
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