UserForm with Colors

Ks1102

Well-known Member
Joined
Jan 8, 2008
Messages
687
Experts

I have code here’s want some one can help me modify, the intents just only want if the values of the caption are ( negative ) to shown me colors RED, but getting errors as I only the beginner for this !!

Thanks very much

Private Sub UserForm_Activate()
Sheets("Sheet1").Activate
Label4.Caption = ten30
If Label4.Caption < 0 Then
Label4.ForeColor = vbRed
End If
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,190,590
Messages
5,981,813
Members
439,735
Latest member
Cbegg

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
Top