View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Excelenator[_34_] Excelenator[_34_] is offline
external usenet poster
 
Posts: 1
Default TEXT-formula in VB Macro fails


Try changing this

NewWks.Cells(oRow, "D").Value = "=TEXT(" & .Cells(iRow, iCol).Value &
";""#.##0,00"")"

To

NewWks.Cells(oRow, "D").Value
WORKSHEETFUNCTION.TEXT(.Cells(iRow,iCol).TEXT;""#. ##0,00""

--
Excelenato

-----------------------------------------------------------------------
Excelenator's Profile: http://www.excelforum.com/member.php...fo&userid=3676
View this thread: http://www.excelforum.com/showthread.php?threadid=56788