Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close workboook if it is open
Hi! I want to check if a workbook is open. If it is open I want to close it.
The probelm is that if I want to check if it is open and it is not the code cannot find the sheet at all and thus produces an error. Is there any way I can check if it is open without getting an error? thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close workboook if it is open
I use
Windows(cl).close savechanges = False where cl is the workbook I want to close, I usually have an "On error resume next" so that if the workbook isn't there it won't error when it can't close. "Arne Hegefors" wrote: Hi! I want to check if a workbook is open. If it is open I want to close it. The probelm is that if I want to check if it is open and it is not the code cannot find the sheet at all and thus produces an error. Is there any way I can check if it is open without getting an error? thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close workboook if it is open
Hello Arne
Have a look at http://www.j-walk.com/ss/excel/tips/tip54.htm Walkenbach gives interesting tips on his site!!! greetings "Arne Hegefors" schreef in bericht ... Hi! I want to check if a workbook is open. If it is open I want to close it. The probelm is that if I want to check if it is open and it is not the code cannot find the sheet at all and thus produces an error. Is there any way I can check if it is open without getting an error? thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Slow to open /close | New Users to Excel | |||
stop calculation on workboook open | Excel Programming | |||
if its open...close it | Excel Programming | |||
Open then Close | Excel Programming | |||
On Open/On Close | Excel Programming |