Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default File kill help

The following code was written with the intent to:

1) make a copy of the active workbook, name it "PAPenguins"

2) unmap a network drive

3) delete the file "PAPenguins"

It is not working. Can someone please help!!!

Dim SaveCode
SaveCode = "V:\" & Range("g7") & "\" & Range("b4") & " wit
Comments.xls"
ActiveWorkbook.SaveAs Filename:=SaveCode, FileFormat _
:=xlNormal, password:="", WriteResPassword:=""
ReadOnlyRecommended _
:=False, CreateBackup:=False
Dim wb As Workbook
Set wb = ActiveWorkbook
With wb
.SaveAs "PAPenguins.xls"
Call Unmap
x = .FullName
.Close False
Kill x
End With
ActiveSheet.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "PAPenguins.xls"
x = .FullName
.Close False
Kill x
End Wit

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kill Macro Jeff Excel Discussion (Misc queries) 4 September 27th 06 04:33 PM
On time kill Antonio Excel Discussion (Misc queries) 4 June 8th 06 10:50 AM
Kill Command JamieD[_3_] Excel Programming 3 January 30th 04 01:20 PM
kill worksheets portroe Excel Programming 2 January 25th 04 11:11 PM
AutoFill KILL Frustrated[_2_] Excel Programming 1 July 29th 03 04:40 PM


All times are GMT +1. The time now is 02:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"