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