Results 1 to 6 of 6

Thread: Check if file is already open

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Apr 2011
    Posts
    190
    Rep Power
    15

    Check if file is already open

    I use the code below to open up my XLSX file - How can I check if the file is already open - I keep track of the names of the files in a two column multi-select Listbox - column 0 is the name of the file and column 1 is the path to the file.

    Code:
    For ii = 0 To LBDataWorkbook.ListCount - 1
            If LBDataWorkbook.Selected(ii) Then
                   Workbooks.Open FileName:=LBDataWorkbook.List(ii, 1) & LBDataWorkbook.List(ii)
           End if
    Next ii
    Also - How do you add file headers in a listbox - I can set the property to on - but cannot figure how to get the text into the headers
    Last edited by Rasm; 11-23-2011 at 03:43 AM.
    xl2007 - Windows 7
    xl hates the 255 number

Similar Threads

  1. Open PDF file with PowerPoint VBA
    By bg52ip in forum Powerpoint Help
    Replies: 4
    Last Post: 06-12-2013, 11:28 PM
  2. Replies: 4
    Last Post: 06-09-2013, 01:43 AM
  3. Excel VBA Macro To Open A File Through Browse Dialog Box
    By Safal Shrestha in forum Excel Help
    Replies: 2
    Last Post: 04-05-2013, 12:59 PM
  4. Setting up a check box
    By Howardc in forum Excel Help
    Replies: 2
    Last Post: 08-07-2012, 08:26 AM
  5. Replies: 1
    Last Post: 06-02-2011, 10: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
  •