Results 1 to 3 of 3

Thread: Simple XL launcher exe.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    VBAX Regular
    Joined
    Oct 2004
    Location
    Belgium
    Posts
    25
    Location
    Hi,

    see the code. I've used a form with a listbox and a button. Data starts to read at row 1. When you start the form, listbox is filled in. If you then select an item and execute the code of the button, you get a first result.

    I hope this gives you a first idea and a good start.
    To know which user a file has open is a little bit more work.(searched longtime myself)

     
    Private Sub CommandButton1_Click()
        On Error GoTo FileNotOpen
        Workbooks.Open ActiveSheet.Cells(ListBox1.ListIndex + 1, 2).Value
        Exit Sub
        FileNotOpen:
        MsgBox "File doesn't exist!"
    End Sub
      
    Private Sub UserForm_Activate()
        Dim intRow          As Integer
        ' Start on row 1
        intRow = 1
        Do While ActiveSheet.Cells(intRow, 1).Value <> ""
            ListBox1.AddItem ActiveSheet.Cells(intRow, 1).Value
            intRow = intRow + 1
        Loop
    End Sub

    Gollem
    Last edited by Aussiebear; 01-30-2025 at 11:38 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
  •