I have 3 worksheets; REPORT, RECORD, and SHADOW RECORD. Report is filled out by the user and when they fill it in the data appears in SHADOW RECORD. When they click SAVE the data in SHADOW RECORD is copied from shadow record to RECORD. After which, the report that the user fills in is then saved as a pdf with the default name of the Inspection Number.
However I am having problems writing code for this as I have done this manually and I think it is one of those things where the code is much more efficient than doing it manually. This is what my manual steps look like :
'
' SAVE Macro
' RECORDLOG + PDF
'
'
Sheets("SHADOWRECORD").Select
Range("A2:J2").Select
Selection.Copy
Sheets("RECORD").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Rows("2:2").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Sheets("REPORT").Select
Range("C1:Q71").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"\\Domain01\UserData$\Desktop\H&S MOCK 001.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
Basically when I run the macro the information being copied from SHADOW RECORDS to RECORDS is not consistent and when I did it manually I inserted a row manually after I had pasted special (values) into the first row underneath the column titles in row 1. The pdf can be created but the saving of it is difficult as you are having to manually save the document rather than doing it automatically. Should I ditch the manual and go vba ? and what should my code look like?
Bookmarks