+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] Launch IE Browser and manage vertical scroll bars

  1. #1
    gary
    Guest

    [SOLVED] Launch IE Browser and manage vertical scroll bars

    Using VBA, I need to start an Internet Explorer browser from Excel. The
    below code does this but I am not able to control the vertical scroll bars
    from my VBA application. How do I do this so I can poisition the scroll bar
    where I want it displayed?

    Here is the vb code that works:

    Set Ie = CreateObject("InternetExplorer.Application")
    Ie.AddressBar = False
    Ie.MenuBar = False
    Ie.Toolbar = False
    Ie.Width = 600
    Ie.Height = 750
    Ie.Left = 0
    Ie.Top = 0

    Ie.navigate "www.yahoo.com"
    Ie.resizable = True
    Ie.Visible = True

    Ie.document.vscrollbar.value = 200 ' THIS DOES NOT WORK !!

    Thanks,

    Gary


  2. #2
    PERSONNE@ICI
    Guest

    RE: Launch IE Browser and manage vertical scroll bars

    Hi,

    Try this

    Sub LaunchIeAndManageVerticalScroll()
    Const READYSTATE_COMPLETE& = 4&
    Dim ie As Object
    Set ie = CreateObject("InternetExplorer.Application")
    With ie
    .AddressBar = False
    .MenuBar = False
    .Toolbar = False
    .Width = 600&
    .Height = 750&
    .Left = 0&
    .Top = 0&
    .navigate "www.yahoo.com"
    .resizable = True
    While Not .readyState = READYSTATE_COMPLETE
    DoEvents
    Wend
    .document.parentWindow.scroll 0&, 200&
    .Visible = True
    End With
    Set ie = Nothing
    End Sub

    Alain CROS


    "gary" wrote:

    > Using VBA, I need to start an Internet Explorer browser from Excel. The
    > below code does this but I am not able to control the vertical scroll bars
    > from my VBA application. How do I do this so I can poisition the scroll bar
    > where I want it displayed?
    >
    > Here is the vb code that works:
    >
    > Set Ie = CreateObject("InternetExplorer.Application")
    > Ie.AddressBar = False
    > Ie.MenuBar = False
    > Ie.Toolbar = False
    > Ie.Width = 600
    > Ie.Height = 750
    > Ie.Left = 0
    > Ie.Top = 0
    >
    > Ie.navigate "www.yahoo.com"
    > Ie.resizable = True
    > Ie.Visible = True
    >
    > Ie.document.vscrollbar.value = 200 ' THIS DOES NOT WORK !!
    >
    > Thanks,
    >
    > Gary
    >


  3. #3
    gary
    Guest

    RE: Launch IE Browser and manage vertical scroll bars

    Arlan,

    This works perfectly !!

    Thanks fro your help. I was stuck on this for a long time.

    Gary

    "PERSONNE@ICI" wrote:

    > Hi,
    >
    > Try this
    >
    > Sub LaunchIeAndManageVerticalScroll()
    > Const READYSTATE_COMPLETE& = 4&
    > Dim ie As Object
    > Set ie = CreateObject("InternetExplorer.Application")
    > With ie
    > .AddressBar = False
    > .MenuBar = False
    > .Toolbar = False
    > .Width = 600&
    > .Height = 750&
    > .Left = 0&
    > .Top = 0&
    > .navigate "www.yahoo.com"
    > .resizable = True
    > While Not .readyState = READYSTATE_COMPLETE
    > DoEvents
    > Wend
    > .document.parentWindow.scroll 0&, 200&
    > .Visible = True
    > End With
    > Set ie = Nothing
    > End Sub
    >
    > Alain CROS
    >
    >
    > "gary" wrote:
    >
    > > Using VBA, I need to start an Internet Explorer browser from Excel. The
    > > below code does this but I am not able to control the vertical scroll bars
    > > from my VBA application. How do I do this so I can poisition the scroll bar
    > > where I want it displayed?
    > >
    > > Here is the vb code that works:
    > >
    > > Set Ie = CreateObject("InternetExplorer.Application")
    > > Ie.AddressBar = False
    > > Ie.MenuBar = False
    > > Ie.Toolbar = False
    > > Ie.Width = 600
    > > Ie.Height = 750
    > > Ie.Left = 0
    > > Ie.Top = 0
    > >
    > > Ie.navigate "www.yahoo.com"
    > > Ie.resizable = True
    > > Ie.Visible = True
    > >
    > > Ie.document.vscrollbar.value = 200 ' THIS DOES NOT WORK !!
    > >
    > > Thanks,
    > >
    > > Gary
    > >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1