ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multipage label caption (https://www.excelbanter.com/excel-programming/429312-multipage-label-caption.html)

ron mann

Multipage label caption
 
Hi All

Is there anyway to set the label name of a tab on a multipage to equal a
worksheet cell value when the userform and multipage are initialised.
--
Many Thanks

Ron

Jacob Skaria

Multipage label caption
 
Ron,

Somthing like this. Index 0 denotes the first tab, 1 for second tab and so
on..If you want to set the labels from a continuous range for all tabs; then
assign the caption within a loop.

Private Sub UserForm_Initialize()
Me.MultiPage1.Pages(0).Caption = Worksheets("Sheet1").Range("A1")
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Ron Mann" wrote:

Hi All

Is there anyway to set the label name of a tab on a multipage to equal a
worksheet cell value when the userform and multipage are initialised.
--
Many Thanks

Ron


ron mann

Multipage label caption
 
Hi Jacob,

Thanks for the reply. It was of great help.

I found last night that the following code also worked.

UserForm2.MultiPage1.Page1.Caption = Worksheets("GENERAL").Range("c1")

Mine might be a little clumsy but got there in the end.

Thanks again.

Ron


"Jacob Skaria" wrote:

Ron,

Somthing like this. Index 0 denotes the first tab, 1 for second tab and so
on..If you want to set the labels from a continuous range for all tabs; then
assign the caption within a loop.

Private Sub UserForm_Initialize()
Me.MultiPage1.Pages(0).Caption = Worksheets("Sheet1").Range("A1")
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Ron Mann" wrote:

Hi All

Is there anyway to set the label name of a tab on a multipage to equal a
worksheet cell value when the userform and multipage are initialised.
--
Many Thanks

Ron



All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com