Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE Automation - Excel
Message
From
23/07/2007 09:10:35
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/07/2007 03:50:53
Ed Hizon
Skswood Sdn. Bhd
Kuala Belait, Brunei
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01242686
Message ID:
01242744
Views:
9
>Dear all,
>
>I would like to know the equivalent code to VFP if using OLE the command in Excel for "Find" The following will give an error:
>
>XLApp = createObject('excel.application')
>XLApp.Visible = .t.
>*XLApp.WorkBooks.open('c:\xxx\xxxx.xls')
>
>
>XLSheet = XLApp.ActiveSheet
>
>xlsheet.range("h:h").select
>
>xlsheet.selection.find.text="ABCD"
>
>Please advise.
>
>Thanks.
>
>Ed

Selection is a property of Excel.Application not Sheet.

xlsheet.application.selection.find.text="ABCD"

or:

xlsheet.range("h:h").find.text="ABCD"

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform