Multi link button

  • Hi All


    I'm trying to solve this: got userform with listbox and one "depending" button when is click to open docs from folder. What I want is: depending on where I click on listbox, button hyperlink to change to different doc.
    Is that possible!??
    in other words

    Code
    Select Case Me.Listbox1
        Case .Selected.Listbox1.ListIndex = 1
    btnDocs = ActiveWorkbook.FollowHyperlink Address:="Mac:Users:dmb:Dropbox:Machine:folder1:image1.jpg", NewWindow:=True
     Case .Selected.Listbox1.ListIndex = 2
    btnDocs = ActiveWorkbook.FollowHyperlink Address:="Mac:Users:dmb:Dropbox:Machine:folder2:image1.jpg", NewWindow:=True
    Case Else
    
    
    End Select


    Any help will be appreciated
    cheers

  • Re: Multi link button


    You don't need a button, but remember the ListIndex starts at 0, -1 indicates no selection

  • Re: Multi link button


    Hi Roy,


    I get a list of the machines in listbox1 and for every machine I got special folder with pictures and docs for that machine in my dropbox folder... I need a buttton because what I want is :
    1. click on first machine in the listbox (ID1), the button (btnDocs) link should be to files in folder (for example "folderID1") with docs for machineID1,
    2. click on first machine in the listbox (ID2), the button (btnDocs) link should be to files in folder (for example "folderID2") with docs for machineID2,
    3. click on first machine in the listbox (ID3), the button (btnDocs) link should be to files in folder (for example "folderID3") with docs for machineID3............


    when selected on listbox I get data for that machine in textboxes, and I want to have an option just in case I want to see images for that machine.


    so, the objective is to have a button that is dependent of selection on listbox.


    Thank you for trying to help me

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!