![]() |
Change Number to Arabic and back
Hi,
I have set my regional settings to English(UK). Is it possible to change the number format to Arabic(Saudi Arabia) and back to English(UK) by code? So that I will run a report using either of the number format. Thanks Abdul |
Change Number to Arabic and back
Abdul,
Something like this: Private Sub CommandButton6_Click() Const NUMFORMAT As String = "#0" With Range("B9") If .NumberFormat = "[$-2000401]" & NUMFORMAT Then .NumberFormat = NUMFORMAT Else .NumberFormat = "[$-2000401]" & NUMFORMAT End If End With End Sub NickHK "Abdul" wrote in message oups.com... Hi, I have set my regional settings to English(UK). Is it possible to change the number format to Arabic(Saudi Arabia) and back to English(UK) by code? So that I will run a report using either of the number format. Thanks Abdul |
Change Number to Arabic and back
Thanks Nick
I am looking for a way to change the system Regional settings temporarily. I just want to change the Language to Arabic(Saudi Arabia) so that the number format will also change and then back to English(UK) By just changing the format in acell is not changing the digits to Arabic way. Thanks Abdul NickHK wrote: Abdul, Something like this: Private Sub CommandButton6_Click() Const NUMFORMAT As String = "#0" With Range("B9") If .NumberFormat = "[$-2000401]" & NUMFORMAT Then .NumberFormat = NUMFORMAT Else .NumberFormat = "[$-2000401]" & NUMFORMAT End If End With End Sub NickHK "Abdul" wrote in message oups.com... Hi, I have set my regional settings to English(UK). Is it possible to change the number format to Arabic(Saudi Arabia) and back to English(UK) by code? So that I will run a report using either of the number format. Thanks Abdul |
Change Number to Arabic and back
Abdul,
English Excel 2002 showed Arabic characters with that code, which I assumed were numerals, but apparently I was wrong. There is a previous thread in this NG about this, "Modify windows language using VBA", but still requires user interaction. NickHK "Abdul" wrote in message oups.com... Thanks Nick I am looking for a way to change the system Regional settings temporarily. I just want to change the Language to Arabic(Saudi Arabia) so that the number format will also change and then back to English(UK) By just changing the format in acell is not changing the digits to Arabic way. Thanks Abdul NickHK wrote: Abdul, Something like this: Private Sub CommandButton6_Click() Const NUMFORMAT As String = "#0" With Range("B9") If .NumberFormat = "[$-2000401]" & NUMFORMAT Then .NumberFormat = NUMFORMAT Else .NumberFormat = "[$-2000401]" & NUMFORMAT End If End With End Sub NickHK "Abdul" wrote in message oups.com... Hi, I have set my regional settings to English(UK). Is it possible to change the number format to Arabic(Saudi Arabia) and back to English(UK) by code? So that I will run a report using either of the number format. Thanks Abdul |
All times are GMT +1. The time now is 11:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com