View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Thomas Giessner Thomas Giessner is offline
external usenet poster
 
Posts: 1
Default Replace function in Excel with MFC

Hello,
I tried to use the replace function for Excel like this:

t_sTmp.Format("1/%d",m_iScale);
oRange.Replace(COleVariant("string to find"),//const VARIANT& What
COleVariant(t_sTmp),//const VARIANT& Replacement
COleVariant((short)1),//const VARIANT& LookAt
COleVariant((short)1),//const VARIANT& SearchOrder
COleVariant((short)TRUE),//const VARIANT& MatchCase
COleVariant((short)FALSE),//const VARIANT& MatchByte
COleVariant((short)FALSE),//const VARIANT& MatchControlCharacters
COleVariant((short)FALSE),//const VARIANT& MatchDiacritics
COleVariant((short)FALSE),//const VARIANT& MatchKashida
COleVariant((short)FALSE));//const VARIANT& MatchAlefHamza

But if I run the program I get an error: Unzulässige Parameteranzahl
(incorrect amount of parameter).
Whats wrong?
Thanks for helping
Thomas