PDA

View Full Version : hiding/unhiding a page on a userform



northernstar
09-17-2007, 03:02 PM
hi everyone

i have a form with a few pages on and i would like to hide a page for example x=false and then re show the page when x=true

i have used the for code


if x = false then
multipage1.pages(0).visible = false
end if

if x = true then
multipage1.pages(0).visible=true
end if

this works except i would like the page i am making visible the active page

tried setfocus but no luck

any help/advice much appreciated

thanks

Bob Phillips
09-17-2007, 03:20 PM
Multipage1.Value = 0

rory
09-17-2007, 03:26 PM
Incidentally, you can replace your If statements with:
multipage1.pages(0).visible = x

northernstar
09-17-2007, 10:57 PM
multipage1.value=0

this statement doesnt appear to do anything??

not sure if i explained myself very clearly again, will try again

on the form i have several pages but on startup i have one page visible (JobDetails) and depending on what value is entered into a combobox (EquipmentUsed) on this page depends on what page comes visible next

so
if EquipmentUsed = "E346" then
multipage1.pages("E346DWT").visible = true

end if

then i would now like pages("E346DWT") to be showing and ready to use without having to click on its tab

tried putting in your statement

multipage1.value = 0

but it didnt appear to do anything

would appreciate some more help on this matter

thanks for your help so far