Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Range function with Arabic Text

Hello

I have in an Excel sheet a cell A1 that contains arabic text. When I
try to use Range("A1") function I get a "Type Mismatch" error. While
debugging the code I get "????????" as a value for Range("A1").

Could somebody help me please.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Range function with Arabic Text

The VBE is pretty much tied to the OS language. So if you do not have an
Arabic system, so you will never be able to see the real value, say in the
Debug window or with Intellisense.
However, VBA can work with various langauge.
What is your function signature ?

NickHK


egroups.com...
Hello

I have in an Excel sheet a cell A1 that contains arabic text. When I
try to use Range("A1") function I get a "Type Mismatch" error. While
debugging the code I get "????????" as a value for Range("A1").

Could somebody help me please.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Range function with Arabic Text

Hi Nick

It's Range(cell1, Cell2) As Range

Thanks

NickHK wrote:
The VBE is pretty much tied to the OS language. So if you do not have an
Arabic system, so you will never be able to see the real value, say in the
Debug window or with Intellisense.
However, VBA can work with various langauge.
What is your function signature ?

NickHK


egroups.com...
Hello

I have in an Excel sheet a cell A1 that contains arabic text. When I
try to use Range("A1") function I get a "Type Mismatch" error. While
debugging the code I get "????????" as a value for Range("A1").

Could somebody help me please.

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Range function with Arabic Text

Not sure what you are trying to do, but ..
Dim MyRange As Range
Set MyRange=WorkSheets(1).Cells(1,4)

MsgBox MyRange.Value

NickHK


egroups.com...
Hi Nick

It's Range(cell1, Cell2) As Range

Thanks

NickHK wrote:
The VBE is pretty much tied to the OS language. So if you do not have an
Arabic system, so you will never be able to see the real value, say in
the
Debug window or with Intellisense.
However, VBA can work with various langauge.
What is your function signature ?

NickHK


egroups.com...
Hello

I have in an Excel sheet a cell A1 that contains arabic text. When I
try to use Range("A1") function I get a "Type Mismatch" error. While
debugging the code I get "????????" as a value for Range("A1").

Could somebody help me please.

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Range function with Arabic Text

Hi Nick

I am trying to read cells values then build an insert statement to
insert the data into an oracle database. The procedure is working
properly for English text in the cells.
------------------------------------------------------------------------------------------------------------------------
x_row = 0

While x_row < 10
x_col1 = Range("A" & CStr(x_row))
x_col2 = Range("B" & CStr(x_row))
x_col3 = Range("C" & CStr(x_row))

x_SQL = "INSERT INTO xxp_temp (inventory_item_id, qty_stk,
item_code) VALUES ("
x_SQL = x_SQL & x_col1 & ","
x_SQL = x_SQL & x_col2 & ","
x_SQL = x_SQL & "'" & x_col3 & "')"

conOracle.Execute x_SQL
x_row = x_row + 1
Wend
------------------------------------------------------------------------------------------------------------------------





NickHK wrote:
Not sure what you are trying to do, but ..
Dim MyRange As Range
Set MyRange=WorkSheets(1).Cells(1,4)

MsgBox MyRange.Value

NickHK


egroups.com...
Hi Nick

It's Range(cell1, Cell2) As Range

Thanks

NickHK wrote:
The VBE is pretty much tied to the OS language. So if you do not have an
Arabic system, so you will never be able to see the real value, say in
the
Debug window or with Intellisense.
However, VBA can work with various langauge.
What is your function signature ?

NickHK


egroups.com...
Hello

I have in an Excel sheet a cell A1 that contains arabic text. When I
try to use Range("A1") function I get a "Type Mismatch" error. While
debugging the code I get "????????" as a value for Range("A1").

Could somebody help me please.

Thanks





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Range function with Arabic Text

How are those 3 "x_col?" variables dimmed ?

I find it easier to work with byte arrays, when dealing with Chinese text on
non-chinese system, to protect against VBA's UNICODE<ANSI conversion
So, I would assume the same for Arabic text also.

e.g. Dim x_col3() As Byte

Also you need your database set up to accept/expect nchar/nvarchar data.

NickHK


groups.com...
Hi Nick

I am trying to read cells values then build an insert statement to
insert the data into an oracle database. The procedure is working
properly for English text in the cells.
------------------------------------------------------------------------------------------------------------------------
x_row = 0

While x_row < 10
x_col1 = Range("A" & CStr(x_row))
x_col2 = Range("B" & CStr(x_row))
x_col3 = Range("C" & CStr(x_row))

x_SQL = "INSERT INTO xxp_temp (inventory_item_id, qty_stk,
item_code) VALUES ("
x_SQL = x_SQL & x_col1 & ","
x_SQL = x_SQL & x_col2 & ","
x_SQL = x_SQL & "'" & x_col3 & "')"

conOracle.Execute x_SQL
x_row = x_row + 1
Wend
------------------------------------------------------------------------------------------------------------------------





NickHK wrote:
Not sure what you are trying to do, but ..
Dim MyRange As Range
Set MyRange=WorkSheets(1).Cells(1,4)

MsgBox MyRange.Value

NickHK


egroups.com...
Hi Nick

It's Range(cell1, Cell2) As Range

Thanks

NickHK wrote:
The VBE is pretty much tied to the OS language. So if you do not have
an
Arabic system, so you will never be able to see the real value, say in
the
Debug window or with Intellisense.
However, VBA can work with various langauge.
What is your function signature ?

NickHK


egroups.com...
Hello

I have in an Excel sheet a cell A1 that contains arabic text. When I
try to use Range("A1") function I get a "Type Mismatch" error. While
debugging the code I get "????????" as a value for Range("A1").

Could somebody help me please.

Thanks





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Range function with Arabic Text

the problem is not with the x_col variable but it's in the Range
function.

Thx

NickHK wrote:
How are those 3 "x_col?" variables dimmed ?

I find it easier to work with byte arrays, when dealing with Chinese text on
non-chinese system, to protect against VBA's UNICODE<ANSI conversion
So, I would assume the same for Arabic text also.

e.g. Dim x_col3() As Byte

Also you need your database set up to accept/expect nchar/nvarchar data.

NickHK


groups.com...
Hi Nick

I am trying to read cells values then build an insert statement to
insert the data into an oracle database. The procedure is working
properly for English text in the cells.
------------------------------------------------------------------------------------------------------------------------
x_row = 0

While x_row < 10
x_col1 = Range("A" & CStr(x_row))
x_col2 = Range("B" & CStr(x_row))
x_col3 = Range("C" & CStr(x_row))

x_SQL = "INSERT INTO xxp_temp (inventory_item_id, qty_stk,
item_code) VALUES ("
x_SQL = x_SQL & x_col1 & ","
x_SQL = x_SQL & x_col2 & ","
x_SQL = x_SQL & "'" & x_col3 & "')"

conOracle.Execute x_SQL
x_row = x_row + 1
Wend
------------------------------------------------------------------------------------------------------------------------





NickHK wrote:
Not sure what you are trying to do, but ..
Dim MyRange As Range
Set MyRange=WorkSheets(1).Cells(1,4)

MsgBox MyRange.Value

NickHK


egroups.com...
Hi Nick

It's Range(cell1, Cell2) As Range

Thanks

NickHK wrote:
The VBE is pretty much tied to the OS language. So if you do not have
an
Arabic system, so you will never be able to see the real value, say in
the
Debug window or with Intellisense.
However, VBA can work with various langauge.
What is your function signature ?

NickHK


egroups.com...
Hello

I have in an Excel sheet a cell A1 that contains arabic text. When I
try to use Range("A1") function I get a "Type Mismatch" error. While
debugging the code I get "????????" as a value for Range("A1").

Could somebody help me please.

Thanks




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Range function with Arabic Text

How do you know ?
Assuming the text in the cell is valid Arabic text, then that is what you
have in Range("C" & CStr(x_row)).Value, which is held in Unicode.
When you assign it to a VBA string/variant variable, you get conversion. If
your system is not compatible with the source language, you will get "????".
If you a byte array, does it work ?

NickHK


groups.com...
the problem is not with the x_col variable but it's in the Range
function.

Thx

NickHK wrote:
How are those 3 "x_col?" variables dimmed ?

I find it easier to work with byte arrays, when dealing with Chinese text
on
non-chinese system, to protect against VBA's UNICODE<ANSI conversion
So, I would assume the same for Arabic text also.

e.g. Dim x_col3() As Byte

Also you need your database set up to accept/expect nchar/nvarchar data.

NickHK


groups.com...
Hi Nick

I am trying to read cells values then build an insert statement to
insert the data into an oracle database. The procedure is working
properly for English text in the cells.
------------------------------------------------------------------------------------------------------------------------
x_row = 0

While x_row < 10
x_col1 = Range("A" & CStr(x_row))
x_col2 = Range("B" & CStr(x_row))
x_col3 = Range("C" & CStr(x_row))

x_SQL = "INSERT INTO xxp_temp (inventory_item_id, qty_stk,
item_code) VALUES ("
x_SQL = x_SQL & x_col1 & ","
x_SQL = x_SQL & x_col2 & ","
x_SQL = x_SQL & "'" & x_col3 & "')"

conOracle.Execute x_SQL
x_row = x_row + 1
Wend
------------------------------------------------------------------------------------------------------------------------





NickHK wrote:
Not sure what you are trying to do, but ..
Dim MyRange As Range
Set MyRange=WorkSheets(1).Cells(1,4)

MsgBox MyRange.Value

NickHK


egroups.com...
Hi Nick

It's Range(cell1, Cell2) As Range

Thanks

NickHK wrote:
The VBE is pretty much tied to the OS language. So if you do not
have
an
Arabic system, so you will never be able to see the real value, say
in
the
Debug window or with Intellisense.
However, VBA can work with various langauge.
What is your function signature ?

NickHK


egroups.com...
Hello

I have in an Excel sheet a cell A1 that contains arabic text.
When I
try to use Range("A1") function I get a "Type Mismatch" error.
While
debugging the code I get "????????" as a value for Range("A1").

Could somebody help me please.

Thanks






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Range function with Arabic Text

Dear Nick

Thank you very much, it worked when I defined it as: Dim x_col1() As
Byte
Whe building the SQL string I had to do it as follows: x_SQL = x_SQL &
CStr(x_col1) & ","

Thanks again
Elie Constantine

NickHK wrote:
How do you know ?
Assuming the text in the cell is valid Arabic text, then that is what you
have in Range("C" & CStr(x_row)).Value, which is held in Unicode.
When you assign it to a VBA string/variant variable, you get conversion. If
your system is not compatible with the source language, you will get "????".
If you a byte array, does it work ?

NickHK


groups.com...
the problem is not with the x_col variable but it's in the Range
function.

Thx

NickHK wrote:
How are those 3 "x_col?" variables dimmed ?

I find it easier to work with byte arrays, when dealing with Chinese text
on
non-chinese system, to protect against VBA's UNICODE<ANSI conversion
So, I would assume the same for Arabic text also.

e.g. Dim x_col3() As Byte

Also you need your database set up to accept/expect nchar/nvarchar data.

NickHK


groups.com...
Hi Nick

I am trying to read cells values then build an insert statement to
insert the data into an oracle database. The procedure is working
properly for English text in the cells.
------------------------------------------------------------------------------------------------------------------------
x_row = 0

While x_row < 10
x_col1 = Range("A" & CStr(x_row))
x_col2 = Range("B" & CStr(x_row))
x_col3 = Range("C" & CStr(x_row))

x_SQL = "INSERT INTO xxp_temp (inventory_item_id, qty_stk,
item_code) VALUES ("
x_SQL = x_SQL & x_col1 & ","
x_SQL = x_SQL & x_col2 & ","
x_SQL = x_SQL & "'" & x_col3 & "')"

conOracle.Execute x_SQL
x_row = x_row + 1
Wend
------------------------------------------------------------------------------------------------------------------------





NickHK wrote:
Not sure what you are trying to do, but ..
Dim MyRange As Range
Set MyRange=WorkSheets(1).Cells(1,4)

MsgBox MyRange.Value

NickHK


egroups.com...
Hi Nick

It's Range(cell1, Cell2) As Range

Thanks

NickHK wrote:
The VBE is pretty much tied to the OS language. So if you do not
have
an
Arabic system, so you will never be able to see the real value, say
in
the
Debug window or with Intellisense.
However, VBA can work with various langauge.
What is your function signature ?

NickHK


egroups.com...
Hello

I have in an Excel sheet a cell A1 that contains arabic text.
When I
try to use Range("A1") function I get a "Type Mismatch" error.
While
debugging the code I get "????????" as a value for Range("A1").

Could somebody help me please.

Thanks





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I input arabic text into Excel via a UK keyboard? James Brown Excel Discussion (Misc queries) 1 August 25th 07 10:54 PM
convert arbic numbers to arabic text Sameh Excel Worksheet Functions 0 November 19th 06 10:28 PM
Convert arabic number to english text TSK Excel Discussion (Misc queries) 2 July 9th 05 10:24 AM
converting an arabic number into a spellout text Widodo Excel Worksheet Functions 3 April 18th 05 01:18 PM
How do I convert Arabic numbers into a spellout text Widodo Excel Worksheet Functions 1 April 11th 05 12:10 PM


All times are GMT +1. The time now is 05:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"