Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
thanks a lot in advance for the huge support of the community.
I am struggling with something that has to be pretty easy.
I have a vba macro that opens an excel file:
sub openExcel
set XLApp = CreateObject("Excel.Application")
set XLDOC = XLApp.Workbooks.Open("C:\Users\Luis\mydocument.xlsx")
XLApp.Visible = True
end sub
Is there anyway to ONLY open mydocument.xlsx if it is closed, and do nothing if is already openened?
I have search for almost 5h within stackoverflows and QVCommunity but none of the answers seem to work.
Thanks in advance.
What's the problem if the file is already opened respectively what do you want to do with the file?
- Marcus