Making Label in UserForm = Cell.Value

cicconmr

Board Regular
Joined
Jul 5, 2011
Messages
90
I'm using the UserForm as an alert, and that alert will only appear when a certain cell equals a certain value.

What I'm wondering is if there is a way for the Label to be set to Cell.Value.

Matt
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Try like this

Code:
Sub test()
UserForm1.Label1.Caption = Range("A1").Value
UserForm1.Show
End Sub
 
Upvote 0
So you can hard code UserForms with out actually using the interface that builds them?? It seems like if I add a label using the interface I can't control the caption...should I just put this code in a module?
 
Upvote 0
Okay thanks, I did not know I could do things that way...

I really appreciate the help! It's much easier just creating it in a module
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,729
Members
452,939
Latest member
WCrawford

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