Consulting

Results 1 to 2 of 2

Thread: Excel vba to open ie ribbon

  1. #1
    VBAX Regular
    Joined
    Jul 2016
    Posts
    14
    Location

    Excel vba to open ie ribbon

    Hy. I need some help with the coding. I have the following code written:

     Sub test ()
        Dim IEexp As Object
        Dim Fname As String
        Dim koda As String
        Dim stran As String
        Dim site As String
    
        Fname = Sheets("Osnove").Range("ime").Text
        koda = Sheets("Osnove").Range("B12").Text
        stran = "webpage"
        
        Set IEexp = New InternetExplorerMedium
        IEexp.Visible = True
        IEexp.navigate stran
        Do
            DoEvents
        Loop Until IEexp.ReadyState = READYSTATE_COMPLETE
    
            IEexp.Document.getElementById("Ribbon.Library-title").Click
            IEexp.Document.getElementById("Ribbon.Library.Settings.DocumentLibrarySettings-Large").Click
            
        Set IEexp = Nothing
    End Sub
    the internet Explorer opens on the page that I want, however, the ribbon dos not open (it is hidden). within a ribbon there is a button/folder I want to open. The id of this button is : "Ribbon.Library.Settings.DocumentLibrarySettings-Large".

    any ideas?

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Try asking here. The site owner wrote a book about the Ribbon
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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