Updating multipage tab captions automatically?

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:
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
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Thank you! That did the trick. I kept looking around the Multipage for Initialize until 40 minutes later when I re-read you say UserForm.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,937
Messages
6,175,525
Members
452,651
Latest member
wordsearch

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top