dgd1212
asked on
Edit a Macro to input text
I currently have this macro:
Sub DuplicateRename()
strFileCopyFrom = ThisWorkbook.Path & "\" & "Template Checklist.pdf"
For Each c In Range(Range("A2"), Range("A" & Cells.Rows.Count).End(xlUp ))
strFileCopyTo = ThisWorkbook.Path & "\" & "Template Checklist" & "_" & Format(c, "000") & ".pdf"
FileCopy strFileCopyFrom, strFileCopyTo
Next
End Sub
This line needs to be changed:
strFileCopyFrom = ThisWorkbook.Path & "\" & "Template Checklist.pdf"
I need to be able to input various form names from Sheet 1 C3 in place of the same name of "Template Checklist.pdf"
Thanks
Sub DuplicateRename()
strFileCopyFrom = ThisWorkbook.Path & "\" & "Template Checklist.pdf"
For Each c In Range(Range("A2"), Range("A" & Cells.Rows.Count).End(xlUp
strFileCopyTo = ThisWorkbook.Path & "\" & "Template Checklist" & "_" & Format(c, "000") & ".pdf"
FileCopy strFileCopyFrom, strFileCopyTo
Next
End Sub
This line needs to be changed:
strFileCopyFrom = ThisWorkbook.Path & "\" & "Template Checklist.pdf"
I need to be able to input various form names from Sheet 1 C3 in place of the same name of "Template Checklist.pdf"
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER