I using Access 2010 (Enterprise) on Windows 7 Enterprise PC. In the course of executing VBA code, I open an Excel workbook in Access using
In making changes to the Access program, it occasionally crashes and I close the above wKb. Sometimes, on a crash, I manually close the wKb.
My issue is when I don't have to opportunity to close the subject wKb, manually or programmically, AND on opening a new instance of the Access program I am unable to open the subject workbook file for changes; the wKb is hidden and is open. I can't close the wKb programmatically. I can't "see" the wKb when "checking" open workbooks. To presently cure the problem, I have to re-boot.
Question: How can I close the "hidden & open" wKb, without saving the changes, which I cannot "see" in Access. :banghead:
Of course, fix all program errors so that it doesn't crash.
Thank you in advance for your insight and suggestions.
PHP:
Dim xlAPP As Excel.Application
Dim wKb As Excel.Workbook
Dim sNewxlsx = {a valid path and "xlsx" file}
Set xlAPP = New Excel.Application
xlAPP.Visible = True
Set wKb = Workbooks.Open(FileName:=sNewxlsx, ReadOnly:=False)
{various machinations and calculations on the wKb}
In making changes to the Access program, it occasionally crashes and I close the above wKb. Sometimes, on a crash, I manually close the wKb.
My issue is when I don't have to opportunity to close the subject wKb, manually or programmically, AND on opening a new instance of the Access program I am unable to open the subject workbook file for changes; the wKb is hidden and is open. I can't close the wKb programmatically. I can't "see" the wKb when "checking" open workbooks. To presently cure the problem, I have to re-boot.
Question: How can I close the "hidden & open" wKb, without saving the changes, which I cannot "see" in Access. :banghead:
Of course, fix all program errors so that it doesn't crash.
Thank you in advance for your insight and suggestions.