thenapolitan
Board Regular
- Joined
- Sep 5, 2014
- Messages
- 52
Hey All,
You guys have been a big help before. Hopefully we can get something going again.
So, I have been using the following code. Works PERFECTLY on my computer, but when I move it over to another computer it closes ALL the Workbooks and leaves me with a blank Excel application open.
Any ideas on why it is closing everything on a different computer, but works fine on mine? I'm pulling my hair out here! This shouldn't be this complicated. Both computers running Office Professional 2016. Mine is Windows 8.1, the other computer is Windows 7.
Cheers,
thenapolitan
You guys have been a big help before. Hopefully we can get something going again.
So, I have been using the following code. Works PERFECTLY on my computer, but when I move it over to another computer it closes ALL the Workbooks and leaves me with a blank Excel application open.
Any ideas on why it is closing everything on a different computer, but works fine on mine? I'm pulling my hair out here! This shouldn't be this complicated. Both computers running Office Professional 2016. Mine is Windows 8.1, the other computer is Windows 7.
Code:
Dim thisWB as Workbook, importWB as Workbook, miscWB as Workbook
set thisWB = ThisWorkbook
set importWB = Workbooks.Open(filepath & filename)
'do some processing and importing and stuff
For Each miscWB In Workbooks
If Not (miscWB Is ThisWorkbook) Then miscWB.Close SaveChanges:=false
Next miscWB
Cheers,
thenapolitan
Last edited: