Hello,
Does anyone know the bug or problem where you get an error message (error 9 or 91) when you address a "window" or a "workbook" with a string like this?
The strange thing is, that this code is running on a lot machines in our Company without any error, but on a few it shows this behavior.
Furthermore, if I'm (with my user-account) running the code on their PC everything is fine; or if they run the code on another pc it is also fine.
So I guess it must be a special combination of their Excel/windows-Setting.
Perhaps somebody has heard of a bug like this and can me give a hint, where I can search for it.
thx in advance
a desperate VBA-amateur
Does anyone know the bug or problem where you get an error message (error 9 or 91) when you address a "window" or a "workbook" with a string like this?
Code:
strFile = "NameOfWorkbook"
Windows(strFile).visible = false
Workbooks(strFile).Close
The strange thing is, that this code is running on a lot machines in our Company without any error, but on a few it shows this behavior.
Furthermore, if I'm (with my user-account) running the code on their PC everything is fine; or if they run the code on another pc it is also fine.
So I guess it must be a special combination of their Excel/windows-Setting.
Perhaps somebody has heard of a bug like this and can me give a hint, where I can search for it.
thx in advance
a desperate VBA-amateur