Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check to see if file is open and close it

Status
Not open for further replies.

vbpadawan

Programmer
Oct 8, 2002
28
US
I know that I have run across this question before but can't seem to find it now that I need it.

I need to check to see if and excel file is open and if it is, I need to close it.

Can someone help me out.

Thanks.
 
You could use the FindWindow (to see if it's open) and PostMessage (to close it) API functions.

Hope this helps.

k2w
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top