Wim
New Member
I developed a model where all bank transactions are recorded in a base. Then there is an extract page pulling data to this page given certain criteria. Then the following code exports this extract page to be saved as a new file which are to be used by cashiers for receipting of which the detail later on are updated to this model.
It works well but there are hidden columns and rows which I don't want to be exported/copied as part of the new file. Have tried different code but to no avail.
I would also like to have a "footer" included at the bottom for the signatures of the Cashier and the Supervisor.
Advise someone please?
Code:
Sub CopyDirectDepositSheet()
'~~> Change Sheet1 to the relevant sheet
'~~> This will create a new workbook with the relevant sheet
ThisWorkbook.Sheets("Direct Deposits").Copy
'Delete buttons
ActiveSheet.DrawingObjects.Delete
'Give option of new filename to be chosen
Application.DisplayAlerts = False
fName = Application.GetSaveAsFilename(filefilter:="Excel Files (*.xlsx), *.xlsx")
ActiveWorkbook.SaveAs Filename:=fName
Application.DisplayAlerts = True
'~~> Save the new workbook when you want to save it every time as a specific workbook
'ActiveWorkbook.SaveAs "Receipting.xlsx", FileFormat:=51
End Sub
It works well but there are hidden columns and rows which I don't want to be exported/copied as part of the new file. Have tried different code but to no avail.
I would also like to have a "footer" included at the bottom for the signatures of the Cashier and the Supervisor.
Advise someone please?
Last edited: