Removing `form buttons` in VBA?
Ok im finally getting towards the end of my invoice spread sheet (thanks for your previous help everyone).
I now have 2 worksheets, 1 which will hold all data relevant to the customer (ie hours worked etc) and 1 which will hold data relevant to the office (hours worked + expenses, costing etc).
Now I need to save the first sheet as a new document, which is fine;
Sub savecustomercopy()
ActiveSheet.Copy
Dim newfile As String, ssno As String, eng As String, cust As String, loc As String
ssno = Range("J2").Value
eng = Range("E6").Value
cust = Range("e4").Value
loc = Range("j4").Value
cusfile = ssno & ", " & eng & ", " & cust & "_" & loc & " _Service Report_CUSTOMER COPY.xls"
ChDir _
"C:\Documents and Settings\KHS\Desktop\Drafts"
ActiveSheet.SaveAs Filename:=cusfile
ActiveWorkbook.Close
MsgBox "Customer Copy Created", vbInformation
This works fine but the problem is I have several `form buttons` on this sheet which I now need to remove from the final document.
Is there a way of removing these in VBA, either by deleting them or choosing not to save them?
Also, before the workbook closes I would like to change the view to `pagebreak view` so that the sheet is viewed on screen when the file is reopened. Is there a way to do this in VBA?
Thanks!!!!!!
|