Re: How to go to next Excel Worksheet from Oracle Forms using DDE?

From: Gerrit-Jan Linker <gjlinker_at_oraxcel.com>
Date: Sat, 23 Feb 2002 17:17:04 +0000 (UTC)
Message-ID: <a58iqf$1ie$4_at_paris.btinternet.com>


Hi,

You can access the worksheets by iterating through the worksheets collection. You should be able to do this from DDE. Also you can execute the Find method of the range to find what you need. Example:

Dim wb as Workbook
Dim ws as Worksheet

Set wb as ActiveWorkbook
For each ws in wb.worksheets

    ws.Cells.Find(What:="green", After:=ActiveCell, LookIn:=xlFormulas, LookAt _

        :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _

        False).Activate

Next ws

Hope this helps,

Gerrit-Jan Linker
SQL*XL: Oracle to Excel bridge: www.oraxcel.com

Helen <lenamail_at_mail.ru> wrote in message news:a427fb3d.0201280716.7b47dec2_at_posting.google.com...
> Hello to Everyone!
>
> Please, help me :) Here is what I would like to do in Forms: open
> Excel Workbook "Monitors.xls", which have some Worksheets. And I need
> to find, for example, word "green" in this Excel Workbook, I mean - in
> all Excel Worksheets of this file.
> Here is my question: How to go to next Excel Worksheet from Oracle
> Forms using DDE?
>
> Shall I use DDE.EXECUTE for this?
> Here is some variants (but all don`t work)
> DDE.EXECUTE(ConvID,'[ActiveWorkbook.Worksheets("1").Activate]',
> TimeOut);
> DDE.EXECUTE(ConvID,'["Monitors.xls".Sheets("List1").Select]', 1000);
> DDE.EXECUTE(ConvID,'[ActiveWorkbook.Sheets("List1").Select]',
> TimeOut);
> (List1 is the name of First Excel Worksheet).
>
> ------
>
> Part of code:
>
> AppID := DDE.App_Begin('E:\Program Files\Microsoft
> Office\Office\EXCEL.EXE C:\L\test_excel\monitors.xls',
> DDE.App_Mode_MINIMIZED);
>
> ConvID := DDE.INITIATE('EXCEL', 'C:\L\test_excel\monitors.xls');
>
> -- var1 DDE.EXECUTE(ConvID,'[ActiveWorkbook.Worksheets("1").Activate]',
> 100000);
>
> /* var 2 */

 DDE.EXECUTE(ConvID,'[C:\L\test_excel\monitors.xls.Sheets("List1").Select]',
> 100000);
> -- var3

 DDE.EXECUTE(ConvID,'[ActiveWorkbook.Sheets("List1").Select]',100000);
>
> Please, if you know, write, what`s wrong? Thank you advance :)
Received on Sat Feb 23 2002 - 18:17:04 CET

Original text of this message