Designer6
02-19-2008, 10:17 AM
Hi,
I have a few questions i am not clear with;
1. How can i make the counter "mycount" from resetting to 1 when going between sub?
2. How do i pass counter "mycount" value like 1, 2, 3...etc from one sub "findbutton sub" to another sub "hiderows sub"?
When the program is in the findbutton sub() mycount is equal to 1. When the program exits findbutton sub() to commandbutton_click sub() and back to findbutton sub() mycount first equals to 0 then1. For somehow it didn't increment at all or resetting when going back and forth between sub.
Thanks
Designer6
private sub commandbutton_click()
call findbuttons (checkbox1, rng)
call findbuttons (checkbox2, rng)
-------------
------------
'for 30 checkboxes
call hiderows
End sub
private sub findbutton()
Dim mycount as integer
mycount = 0
if checkbox & i.value = true Then
code in here
mycount = mycount+1
End If
End sub
private sub hiderows()
code
End Sub
I have a few questions i am not clear with;
1. How can i make the counter "mycount" from resetting to 1 when going between sub?
2. How do i pass counter "mycount" value like 1, 2, 3...etc from one sub "findbutton sub" to another sub "hiderows sub"?
When the program is in the findbutton sub() mycount is equal to 1. When the program exits findbutton sub() to commandbutton_click sub() and back to findbutton sub() mycount first equals to 0 then1. For somehow it didn't increment at all or resetting when going back and forth between sub.
Thanks
Designer6
private sub commandbutton_click()
call findbuttons (checkbox1, rng)
call findbuttons (checkbox2, rng)
-------------
------------
'for 30 checkboxes
call hiderows
End sub
private sub findbutton()
Dim mycount as integer
mycount = 0
if checkbox & i.value = true Then
code in here
mycount = mycount+1
End If
End sub
private sub hiderows()
code
End Sub