Is There A Simpler Way To Update Label Captions?

VitesseCarOwner

Board Regular
Joined
Jun 29, 2012
Messages
79
I've created a userform with in excess of 100 labels which I need to update based on the value in a cell. I'm currently using the method below to update, but was wondering if there was an easier/simpler way?

HTML:
Label1.Caption = Sheet4.Range("E142").Value
Label2.Caption = Sheet4.Range("F142").Value
Label3.Caption = Sheet4.Range("G142").Value
Label4.Caption = Sheet4.Range("H142").Value
Label5.Caption = Sheet4.Range("I142").Value
Label6.Caption = Sheet4.Range("J142").Value
Label7.Caption = Sheet4.Range("K142").Value
Label8.Caption = Sheet4.Range("L142").Value
Label9.Caption = Sheet4.Range("M142").Value
Label10.Caption = Sheet4.Range("N142").Value
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Perhaps.
Code:
For I = 1 to 100
    Me.Controls("Label" & I).Caption = Sheet4.Cells(142, I+4).Value
Next I
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,072
Latest member
DW Draft

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