Hi,
I have a worksheet for our job cards. There is a 'master job card' which saves to a folder marked 'In Progress' with a job number and customer name.
When the all information has been entered onto the job-card-in-progress, I need to save it to another folder 'Completed' and then delete the 'in progress' worksheet.
I have looked and tried to work in some code from other examples but I just cant seem to crack it.
Below is my current code. Any assistance greatly appreciated.
BTW, I am not a programmer, I learned all this from scouring the internet, so programming terminology may be lost on me.
Sub NextInvoice()
Range("I4").Value = Range("I4").Value + 1
Range("C3:E10,H6:J9,G10:J11,B14:J24,B27:G31,B41:J55,I26:J31,B61:J74,C76:J76").ClearContents
End Sub
==================================================================================
Sub SaveInvWithNewNAME()
Dim NewFilname As Variant
'Copy Invoice To New Workbook\
ActiveSheet.Copy
NewFN = "S:\Job Cards\JOBS IN PROGRESS\Job" & Range("I4").Value & Range("H6") & ".xlsx"
Range("I5").Formula = "=Today()"
Range("I5").Value = Range("I5").Value
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextInvoice
End Sub
=================================================================================
Sub Completed()
Dim NewFilname As Variant
'Copy Invoice To New Workbook\
ActiveSheet.Copy
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="S:\Job Cards\Completed\Job " & Range("I4").Value & Range("H6") & "COMPLETED" & ".pdf", OpenAfterPublish:=False
ActiveWorkbook.Close
End Sub
It is in this last bit of code I want to add the magic to, to delete the current sheet being used from the in progress folder.
Bookmarks