Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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:=Rut -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the following (must be in another file; untested)
dim wB as string wB = activeworkbook.fullpath activeworkbook.close false Kill wB Robert Flanagan Macro Systems Delaware, U.S. 302-234-9857 http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "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/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
removing a macro from a workbook | Excel Worksheet Functions | |||
Problem removing hyperlinks in workbook | Excel Discussion (Misc queries) | |||
Removing macros from workbook | Excel Discussion (Misc queries) | |||
Removing link to another workbook | Excel Discussion (Misc queries) | |||
Removing links to other worksheets from within a workbook | Excel Discussion (Misc queries) |