Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem with formula in VBA


Hi,

I get an error when I put this line of code in VBA (I'm using th
Italian version of Excel).

I noticed that when I put more complex formulas I got errors.

Dim mystring as string
Dim firstfreepos as integer

mystring = "=SE(C" & firstFreePos & ";C" & firstFreePos & "-B"
firstFreePos & ";OGGI()-B" & firstFreePos & ") "
Range("D" & firstFreePos).Formula = (mystring)

I got no errors removing the '=' symbol from the beginning of th
formula.
If anyone can help me, it would really be appreciated.
Thanks.
Andre

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem with formula in VBA

Hi nagar

Excel VBA is US-centric, so you need to either use the US-English version of
the formulas (including US separators), or use .FormulaLocal instead of
..Formula (which will only then work with Italian settings).

Regards

Stephen Bullen

"nagar" wrote in message
...

Hi,

I get an error when I put this line of code in VBA (I'm using the
Italian version of Excel).

I noticed that when I put more complex formulas I got errors.

Dim mystring as string
Dim firstfreepos as integer

mystring = "=SE(C" & firstFreePos & ";C" & firstFreePos & "-B" &
firstFreePos & ";OGGI()-B" & firstFreePos & ") "
Range("D" & firstFreePos).Formula = (mystring)

I got no errors removing the '=' symbol from the beginning of the
formula.
If anyone can help me, it would really be appreciated.
Thanks.
Andrea


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



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 Problem cherman Excel Worksheet Functions 5 December 17th 09 05:10 AM
Formula problem sunnydazy Excel Discussion (Misc queries) 3 June 7th 08 03:03 PM
Formula problem David Excel Discussion (Misc queries) 1 August 17th 07 09:46 AM
problem with formula Sy. Excel Discussion (Misc queries) 0 January 23rd 06 02:53 PM
formula problem Kevin Excel Discussion (Misc queries) 1 April 13th 05 02:11 PM


All times are GMT +1. The time now is 12:01 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"