View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Vba - Removing workbook

There is no Delete method of the Workbooks collection. Instead,
just close the workbook.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"ajliaks " wrote in
message ...
Hi all,

I am trying to remove a specific Workbook using code.

I am trying this, but getting error!

Ruta = Left(ActiveWorkbook.Path, _
Len(ActiveWorkbook.Path) - Val(ActiveWorkbook.Name))

Ruta = Ruta & "\" & ToolToErase

Workbooks.Delete Filename:=Ruta


---
Message posted from http://www.ExcelForum.com/