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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamically close an Excel workbook

Status
Not open for further replies.

barnard90

IS-IT--Management
Mar 6, 2005
73
US
Hi
I have an excel sheet C:\Employee.xls
I need to close it dynamically from an another Excel sheet
How do I do that

First I need to check if C:\Employee.xls
is open or not. If it is opened , it has to be immediately closed

Could some one please sugest the code

thanks
 


Hi,

Assuming that the workbook in question is open in the active instance of Excel...
Code:
 Workbooks("Employee.xls").Close

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top