I have the code below that creates a dialog box, or at least I think its called a dialog box. It has a number of options that the user can select. How do I keep all the options available to the user after they have made a selection and pressed the OK button?
Currently once the user pushes the ok button all the options dissapeer.
thank you in advance
smiler44
sub create()
'''''''''''''''''''''''''''''''''''''''''
w = 183 'width of dialog
h = 400 '75 ' height of dialog
Begin Dialog Userdialog1 w, h, "Choose which note to check"
'Groupbox 5, 4, 97, 47, "" ' this puts a box around all the options
Optiongroup .Optiongroup1
Optionbutton 16,12,46,8,"1st", .OptionButton1
Optionbutton 16,30,67,8,"2nd", .OptionButton2
Optionbutton 16,48,67,8,"3rd", .OptionButton3
Optionbutton 16,66,67,8,"4th", .OptionButton4
Optionbutton 16,84,67,8,"5th", .OptionButton5
okbutton 125, 6, 54, 14
cancelbutton 125, 26, 54, 14
end dialog
dim mydialog1 as userdialog1
on error resume next
dialog mydialog1
if err=102 then
msgbox"macro ended"
exit sub
end if
gotohereOpt = mydialog1.optiongroup1
if gotohereOpt= 0 then
page = firstpagefound
row = firstrowfound
userchoice
exit sub
Elseif gotohereOpt= 1 then
page = secondpagefound
row = secondrowfound
userchoice
exit sub
Elseif gotohereOpt= 2 then
page = thirdpagefound
row = thirdrowfound
userchoice
exit sub
Elseif gotohereOpt= 3 then
page = fourthpagefound
row = fourthrowfound
userchoice
exit sub
Elseif gotohereOpt= 4 then
page = fithpagefound
row = fithtrowfound
userchoice
exit sub
end if
end sub
Currently once the user pushes the ok button all the options dissapeer.
thank you in advance
smiler44
sub create()
'''''''''''''''''''''''''''''''''''''''''
w = 183 'width of dialog
h = 400 '75 ' height of dialog
Begin Dialog Userdialog1 w, h, "Choose which note to check"
'Groupbox 5, 4, 97, 47, "" ' this puts a box around all the options
Optiongroup .Optiongroup1
Optionbutton 16,12,46,8,"1st", .OptionButton1
Optionbutton 16,30,67,8,"2nd", .OptionButton2
Optionbutton 16,48,67,8,"3rd", .OptionButton3
Optionbutton 16,66,67,8,"4th", .OptionButton4
Optionbutton 16,84,67,8,"5th", .OptionButton5
okbutton 125, 6, 54, 14
cancelbutton 125, 26, 54, 14
end dialog
dim mydialog1 as userdialog1
on error resume next
dialog mydialog1
if err=102 then
msgbox"macro ended"
exit sub
end if
gotohereOpt = mydialog1.optiongroup1
if gotohereOpt= 0 then
page = firstpagefound
row = firstrowfound
userchoice
exit sub
Elseif gotohereOpt= 1 then
page = secondpagefound
row = secondrowfound
userchoice
exit sub
Elseif gotohereOpt= 2 then
page = thirdpagefound
row = thirdrowfound
userchoice
exit sub
Elseif gotohereOpt= 3 then
page = fourthpagefound
row = fourthrowfound
userchoice
exit sub
Elseif gotohereOpt= 4 then
page = fithpagefound
row = fithtrowfound
userchoice
exit sub
end if
end sub