Results 1 to 5 of 5

Thread: OLE1.object | scroll down the sheet

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2004
    Location
    Turkey, Eskisehir
    Posts
    37

    OLE1.object | scroll down the sheet

    Hi,
    there is an ole object, and I can write a number to excel by it, it is ok.
    but I want to scroll down the sheet inside the ole, say 3, and ı can not do it

    I tried ""xlBook.Worksheets("Sheet1").SmallScroll"" but I don't know exactly the syntax. it fails.

    How can I do? thank you, have a nice day.


    Option Explicit
    Dim xlBook As Excel.Workbook

    Private Sub Command1_Click()
    Set xlBook = OLE1.object
    OLE1.DoVerb vbOLEShow
    xlBook.Worksheets("Sheet1").Cells(4, 4).Value = "1564897"
    end sub

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: OLE1.object | scroll down the sheet

    Record a macro in Excel (Tools>Macros>record)
    scroll the sheet down
    Stop recording
    Tools>Macros>VBA editor to see the code, and use the parts you need to scroll the view of the sheet up and down as required.

    Hope that helps you

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2004
    Location
    Turkey, Eskisehir
    Posts
    37

    Re: OLE1.object | scroll down the sheet

    yes I 've done it, but still I couldn't use it
    it writes

    ActiveWindow.SmallScroll down :=3 (for example 3)

    I couln't adapt it
    now I search the true syntax

  4. #4
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: OLE1.object | scroll down the sheet

    Code:
    OLE1.object.SmallScroll down :=3
    Something like that didn't work?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2004
    Location
    Turkey, Eskisehir
    Posts
    37

    Re: OLE1.object | scroll down the sheet

    no it is not working, but I found I think,

    for example
    set excel=ole1.object
    OLE1.DoVerb vbOLEUIActivate
    excel.application.range("p12").select
    excel.application.range("p12").show

    that is all.
    thank you very much
    Last edited by enis; Mar 31st, 2005 at 05:39 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width