PC Review


Reply
Thread Tools Rate Thread

Change Number to Arabic and back

 
 
Abdul
Guest
Posts: n/a
 
      26th Feb 2007
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

 
Reply With Quote
 
 
 
 
NickHK
Guest
Posts: n/a
 
      26th Feb 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Abdul
Guest
Posts: n/a
 
      26th Feb 2007
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >


 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      27th Feb 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how change number from hindi to arabic Abdulrahman Microsoft Word Document Management 0 18th Jan 2008 12:56 PM
Change Number to Arabic and back Abdul Microsoft Access VBA Modules 1 27th Feb 2007 12:39 PM
How do I change a bullet format back in the Bul.& Number list? =?Utf-8?B?Vy4gVHVja2Vy?= Microsoft Word Document Management 2 24th Apr 2006 03:22 AM
worksheet columns changed from letter to number, how change back =?Utf-8?B?Um9u?= Microsoft Excel New Users 2 9th May 2005 08:35 PM
How do I change Hindi number to Arabic numbers in a Word document. =?Utf-8?B?TWljaGFlbCBNY0NhaW4=?= Microsoft Word Document Management 2 16th Mar 2005 06:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:50 PM.