Alaska Software Inc. - How it is possible do Replace What of a macro in Excell?
Username: Password:
AuthorTopic: How it is possible do Replace What of a macro in Excell?
CESAR CALVOHow it is possible do Replace What of a macro in Excell?
on Wed, 02 Dec 2015 01:32:11 +0100
Hello friends.

I need to make a procedure with this macro in excell:

Columns("E:E").Select
Selection.Replace What:=".", Replacement:="/", LookAt:=xlPart, 
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, 
ReplaceFormat:=False

How is the source code for Xbase program?, especially Replace What.

Regards.
César.
Pascal BoivinRe: How it is possible do Replace What of a macro in Excell?
on Wed, 02 Dec 2015 17:14:06 +0100
It should look like this:

#include "activex.ch"
#include "excel.ch"

oExcel := CreateObject("Excel.Application")
oBook  := oExcel:workbooks:Open("File.XLS")
oSheet := oBook:ActiveSheet
//Not sure how to select a whole column, select the first 999 cells...
oSheet:Range("E1:E999"):Select()
oExcel:Selection:Replace(".", "/", xlPart, xlByRows, .F., .F., .F.)


https://msdn.microsoft.com/en-us/library/office/ff194086.aspx?f=255&MSPPError=-2147217396
CESAR CALVORe: How it is possible do Replace What of a macro in Excell?
on Wed, 02 Dec 2015 21:12:21 +0100
Tnaks Pascal.

"Pascal Boivin" escribió en el mensaje de 
noticias:xn0jua9pz7z7ip000@news.alaska-software.com...

It should look like this:

#include "activex.ch"
#include "excel.ch"

oExcel := CreateObject("Excel.Application")
oBook  := oExcel:workbooks:Open("File.XLS")
oSheet := oBook:ActiveSheet
//Not sure how to select a whole column, select the first 999 cells...
oSheet:Range("E1:E999"):Select()
oExcel:Selection:Replace(".", "/", xlPart, xlByRows, .F., .F., .F.)


https://msdn.microsoft.com/en-us/library/office/ff194086.aspx?f=255&MSPPError=-2147217396