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
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
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
Re: OLE1.object | scroll down the sheet
Code:
OLE1.object.SmallScroll down :=3
Something like that didn't work?
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