Hello,
On my userform i have an OK button and a Refresh userform button , and an Userform initialize.
When somebody has entered all the data they press the OK button and it all the data enters on a worksheet. Then it closes.
Because of this..
I also have a timer which closes it if there is no activity.
And i have a Update refresh button.
And last but not least , on initialize it opens the file again.
The problem: Many times because of the timer or OK button it tries to close the file while there is no file open which gives an ERROR.
Or the person presses Update/refresh before the file is closed and then the userform initializes and tries to open the file again which causes the error , or popup : This file already open are you sure blablalbla.
Solution : A way to check if workbook is open else close it. I tried: If WorkbookIsOpen then Workbook(name.xls).close true
but cannot figure out how to do it.
Bookmarks