Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Reference styles and local/non-local formulae - international problems.

I have a problem that I am sure isn't unique.

I have a userform with a refedit in and when I bring up the form from
a cell that holds a formula I would like to initialise the refedit
with something that is in the formula. E.g. lets say I want the second
parameter of the main function in the formula.

The easiest way to parse this is by getting rCell.Formula and looking
for paranthesis and commas (standard lists).

But then I want to use that parameter and place it into the refedit
that is both in the local language and in the users reference style. I
can use ConvertFormula to change it to the correct reference style,
but how do I convert from VBA language to the local language.

I also need to convert it back as when the refedit changes I would
like to display the result of the refedit text. I can do that easily
in VBA language (US_EN) using Application.Evaluate but I need to
convert the refedit text from the local language back to VBA language.

The refedit text could be anything, a number, actual text, a formula
or even an array (e.g. {1,2,3,4} or {1\2\3\4} if the decimal point is
a comma as it is in most european countries). It could even be a range
in R1C1 style in which the R or C is in the local language (e.g.
german would be Z1S1) so I don't really want to parse a local formula.

Thanks for any help in advance.


Alan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Reference styles and local/non-local formulae - international problems.

Hi Alan,

Did you look at .FormulaLocal, .FormulaR1C1, FormulaLocalR1C1 etc?

Problems do occure with literals, like the format argument for TEXT, R1C1
style addresses in INDIRECT() functions, etc.

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"Alan Howells" wrote in message
om...
I have a problem that I am sure isn't unique.

I have a userform with a refedit in and when I bring up the form from
a cell that holds a formula I would like to initialise the refedit
with something that is in the formula. E.g. lets say I want the second
parameter of the main function in the formula.

The easiest way to parse this is by getting rCell.Formula and looking
for paranthesis and commas (standard lists).

But then I want to use that parameter and place it into the refedit
that is both in the local language and in the users reference style. I
can use ConvertFormula to change it to the correct reference style,
but how do I convert from VBA language to the local language.

I also need to convert it back as when the refedit changes I would
like to display the result of the refedit text. I can do that easily
in VBA language (US_EN) using Application.Evaluate but I need to
convert the refedit text from the local language back to VBA language.

The refedit text could be anything, a number, actual text, a formula
or even an array (e.g. {1,2,3,4} or {1\2\3\4} if the decimal point is
a comma as it is in most european countries). It could even be a range
in R1C1 style in which the R or C is in the local language (e.g.
german would be Z1S1) so I don't really want to parse a local formula.

Thanks for any help in advance.


Alan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Reference styles and local/non-local formulae - international problems.

Thanks Nick, I have thought about them but it would make parsing them
(to get the second parameter of the second function for example) a lot
trickier.

Also since the user would write in his local language into a refedit,
this won't solve my problem of trying to get the result of a formula
written in the refedit, as a) it is in a RefEdit (not a cell so can't
get .Formula etc..) and b)Evaluate only looks in VBA language not
local language.

"Niek Otten" wrote in message ...
Hi Alan,

Did you look at .FormulaLocal, .FormulaR1C1, FormulaLocalR1C1 etc?

Problems do occure with literals, like the format argument for TEXT, R1C1
style addresses in INDIRECT() functions, etc.

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

<SNIP
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
formula for local time and GMT? hsg Excel Worksheet Functions 1 January 9th 10 05:53 PM
Local references Strd M 37 Excel Discussion (Misc queries) 4 June 17th 08 03:51 PM
Can a chart reference the local page Mike H Charts and Charting in Excel 3 May 30th 06 12:58 AM
Local elections D New Users to Excel 1 November 13th 05 05:00 AM
Same Name refers to local ranges Mats Samson Excel Worksheet Functions 6 July 18th 05 01:58 PM


All times are GMT +1. The time now is 12:13 AM.

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

About Us

"It's about Microsoft Excel"