MultiPage problem

A

Aksel Børve

I have a Userform with 4 Multipages, first Multpagpage belong to sheet1,
second Multipage to Sheet2, and so on. Is there a possibility to get e.g.
Multipage3 on Top when I open the Userform from Sheet3? and
Multipage4 on Top when I open the Userform from Sheet4?
Look at http://www.geocities.com/aksel_borve/pumphours2.html if it helps to
understand.
 
B

Bob Phillips

Hi Aksel,

You would need to create a public variable in the userform, say shNum, and
in the show code use something like

Userform1.Load
'this makes the shNum variable available
Select Case ActiveSheet
Case "Sheet1": shNum = 0
Case "Sheet2": shNum = 1
Case "Sheet3": shNum = 2
Case "Sheet4": shNum = 3
End Select

Userform1.Show

then in the userform activate event add

Multipage1.Value = shNum
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
B

Bob Phillips

Show us your code. Mine was just showing the technique.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top