mykulpasskwa
Board Regular
- Joined
- Mar 20, 2018
- Messages
- 66
I have a sheet and when you click on cell B4 a multipage userform opens.
I was able to get the page captions to reflect a particular cell (i.e. Page1 = B4, Page2 = B5...) but they only change once you click on the page. So when the form opens it first says Page1, but when you click it, it changes to the value of the cell which is what I would like it to say all the time.
Is there a way that when the multipage opens it already displays the cell value assigned to it?
This I use to open the form on the sheet:
This I use to rename the page captions on the Multipage form:
I was able to get the page captions to reflect a particular cell (i.e. Page1 = B4, Page2 = B5...) but they only change once you click on the page. So when the form opens it first says Page1, but when you click it, it changes to the value of the cell which is what I would like it to say all the time.
Is there a way that when the multipage opens it already displays the cell value assigned to it?
This I use to open the form on the sheet:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set oRange = Range("D4")
If Not Intersect(Target, oRange) Is Nothing Then
FeesForm.Show
End If
End Sub
This I use to rename the page captions on the Multipage form:
Code:
Sub MultiPage1_Change()[INDENT]With MultiPage1[/INDENT]
.Page1.Caption = Ch33YR.Range("B4")
.Page2.Caption = Ch33YR.Range("B5")
.Page3.Caption = Ch33YR.Range("B6")
.Page4.Caption = Ch33YR.Range("B7")
.Page5.Caption = Ch33YR.Range("B8")
.Page6.Caption = Ch33YR.Range("B9")
.Page7.Caption = Ch33YR.Range("B10")
.Page8.Caption = Ch33YR.Range("B11")
.Page9.Caption = Ch33YR.Range("B12")
.Page10.Caption = Ch33YR.Range("B13")
.Page11.Caption = Ch33YR.Range("B14")
.Page12.Caption = Ch33YR.Range("B15")
.Page13.Caption = Ch33YR.Range("B16")
End With
End Sub