Hi,
Im having trouble deleting a workbook using VBA. What i want is to open a workbook called "xxxxx waiting", make some modification and then save it as readonly but as a "xxxxx complete". I then want to delete the old workvook "xxxxx waiting"
I though i had it cracked but it doesnt seem to work. Ive put the code below if someone could help.
Thanks in advance
Private Sub Save_Click()
ReqNum = Worksheets("che micals").Range( "D2")
With ActiveWorkbook
.SaveAs Filename:="Z:\R eq\" & ReqNum & "Complete", _
FileFormat:=xlN ormal, Password:="", WriteResPasswor d:="", _
ReadOnlyRecomme nded:=True, CreateBackup:=F alse
End With
Kill "Z:\Req\" & ReqNum & "Waiting"
End Sub
Manny
Im having trouble deleting a workbook using VBA. What i want is to open a workbook called "xxxxx waiting", make some modification and then save it as readonly but as a "xxxxx complete". I then want to delete the old workvook "xxxxx waiting"
I though i had it cracked but it doesnt seem to work. Ive put the code below if someone could help.
Thanks in advance
Private Sub Save_Click()
ReqNum = Worksheets("che micals").Range( "D2")
With ActiveWorkbook
.SaveAs Filename:="Z:\R eq\" & ReqNum & "Complete", _
FileFormat:=xlN ormal, Password:="", WriteResPasswor d:="", _
ReadOnlyRecomme nded:=True, CreateBackup:=F alse
End With
Kill "Z:\Req\" & ReqNum & "Waiting"
End Sub
Manny
Comment