(Simple) Showing Labels in UserForm as percentage format

Floyds_Of_London

New Member
Joined
May 29, 2021
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
I created a userform that displays certain values within row of the active cell, as a quick reference in a lofty spreadsheet. Right now it shows all values as regular numbers (shows "1" instead of "100%"), even if the referenced cell is a percentage. Code below --- i want Label9 to show up as a percentage.

Private Sub UserForm_Activate()


Label6.Caption = Range("F" & (ActiveCell.Row)).Value
Label7.Caption = Range("G" & (ActiveCell.Row)).Value
Label8.Caption = Range("H" & (ActiveCell.Row)).Value
Label9.Caption = Range("I" & (ActiveCell.Row)).Value

End Sub
 

Attachments

  • Capture.JPG
    Capture.JPG
    15.7 KB · Views: 25

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Your bad 'cause you use the Value property instead of the cell layout via its Text property …​
 
Upvote 0
Which cell property do you use in your code ?​
 
Upvote 0

As « solution belongs to good enough readers » so why using Value in your code instead of Text property ? …​
 
Upvote 0
I think he wants your code to look like this:
Label6.Caption = Range("F" & (ActiveCell.Row)).Text
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,154
Members
452,615
Latest member
bogeys2birdies

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