Hi !
In workplace changed mine PC and with a new Office 2007 . Sorry , but it seems that CHM files of VBAXL10 is empty ( 2b ) . So I can't to view how Find & Replace function can work . It's needful for me that in TExcelsScript class . Maybe you are using something ? Any sample ?
With best regards and thanks in advance ! Rimantas
Excel TOleAuto - Find & replace function ...
Gale FORd wrote:Don't forget, you can record a macro in Excel then perform your actions and then go back and look at the commands it created.
A good advice !


I looked into macro - here is a piece of source
Code: Select all | Expand
Selection.Replace What:="QWE", Replacement:="555", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Of course , I'll try to convert that to FWH . But I'll thankfull for any help , how to do that .
With best regards ! Rimantas
Rimantas U.
Rimantas wrote: I looked into macro - here is a piece of sourceCode: Select all | Expand
Selection.Replace What:="QWE", Replacement:="555", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Of course , I'll try to convert that to FWH . But I'll thankfull for any help , how to do that .
After some research I created new method for TExcelScript class . Here is a code :
Code: Select all | Expand
METHOD FReplace( nCol, cWhat, cReplacement, nLookAt, nSearchOrder, lMatchCase, lMatchByte, cSearchFormat, cReplaceFormat ) CLASS TExcels
Default nCol := ::oCell:Column
Default nLookAt := 1 // xlWhole = 1 , xlPart = 2
Default nSearchOrder := 2 // xlByColumns = 2 , xlByRows = 1
Default lMatchCase := .f.
::oSheet:Columns( nCol ).Replace( cWhat, cReplacement, nLookAt, nSearchOrder, lMatchCase )
return( NIL )
With best regards ! Rimantas
Rimantas U.