Format numbers in textbox on userform as hindi numbers

YasserKhalil
PlatinumLounger
Posts: 4911
Joined: 31 Aug 2016, 09:02

Format numbers in textbox on userform as hindi numbers

Post by YasserKhalil »

Hello everyone
I have searched for such a topic but didn't find a clue
How can I format a textbox which is on userform to display numbers as Hindi numbers (Arabic numerals)?

I tried such a trick but didn't work

Code: Select all

Format(.Cells(v, 1), "[$-2000401]0")

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Format numbers in textbox on userform as hindi numbers

Post by HansV »

[$-2000401] is an Excel cell format string, not a VBA format string. Use the TEXT worksheet function:

Me.TextBox1.Value = WorksheetFunction.Text(.Cells(v, 1), "[$-2000401]0")
Best wishes,
Hans

YasserKhalil
PlatinumLounger
Posts: 4911
Joined: 31 Aug 2016, 09:02

Re: Format numbers in textbox on userform as hindi numbers

Post by YasserKhalil »

Thank you very much. That worked very well.