Re: Currency value on a lable in a userform

KyleOliver

New Member
Joined
Apr 16, 2016
Messages
31
Re: Currency value on a lable in a userform

Hi,

I have a user form called "
Data_UF
" and when I call the user form up it will reflect all employee details on the employee data worksheet.
The
"
Data_UF
" user form has textboxes, combo boxes and labels.

Cell "
T9
" has the employee's salary as its value. Cell
"T9"
is formatted to Currency but when I call the
"Find_Entry_UF" user form the label called, "LblBasicWage" reflects the employee's salary but not in the currency that cell
"T9"
is formatted in.

Example;
Cell
"T9"
has a value of R10 000 but in label "
LblBasicWage"
it reflects as 10000.

How can I reflects cell
"T9"
as a currency on my user form in label "
LblBasicWage"?

My code is as follows'
Data_UF.LblBasicWage = Sheets("Data").Range("Data_Start").Offset(TargetRow, 18).Value
This code reflects the value as 10000 but not with the currency.
<strike>
</strike>
<strike></strike>
Data_UF.LblBasicWage.Value = Sheets("Data").Range("Data_Start").Offset(TargetRow, 18).Value, "R#,###,###.00")
This code keeps giving me an error.

What am I missing?

:confused::confused:
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Re: Currency value on a lable in a userform

Hello Kyle,

Use the Text property to return the formatted version of the cell's value.

Rich (BB code):
    Data_UF.LblBasicWage = Sheets("Data").Range("Data_Start").Offset(TargetRow, 18).Text
 
Upvote 0
Re: Currency value on a lable in a userform

Hi Leith,

I am embarrassed to tell you just how long I spent trying to solve this problem and all I needed to do was change one word.

Thank-you so much for your help, I did what you said and it is working perfectly.

Thanks again, I really appreciate your help a lot.

Regards,
Kyle
 
Upvote 0
Re: Currency value on a lable in a userform

Hello Kyle,

Your welcome.
You shouldn't feel embarrassed. VBA contains thousands of objects with thousands of properties and methods. It takes time to learn and to remember what is available to you as a programmer.

Thars nae shame in askin'.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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