View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
nagar nagar is offline
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