VB Script for commandbutton

J

Jack_Feeman

I have an online form that has 22 areas of input; each with a continue
checkbox taking them to the last page focusing on the associated continued
input box.

I wouold like to place a commandbutton on the last page of a form that (when
clicked) will take the user back to whatever input box they came from.
Something like the Javascript of <onClick="history.go(-1)">

Otherwise I will have to put a separate macrobuttons (22 total) on each item
taking them back to the respective input area.

Any ideas?
Thanks
Jack
 
W

Word Heretic

G'day "Jack_Feeman" <[email protected]>,

Define a global variable to hold the name or some id of the calling
macro.

Eg

Dim Flag as Long

Sub OnExitCheckbox1()
Flag=1
'do whatever
End Sub

Sub OnExitCheckbox2()
Flag=2
'do whatever
End Sub

Sub ReturnToCallingLocation()

Select case Flag
Case 1
checkbox1.select
case 2
checkbox2 select
end select
end sub


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Jack_Feeman reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top