Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Edit a Macro to input text

Posted on 2013-12-01
2
Medium Priority
?
209 Views
Last Modified: 2013-12-01
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
0
Comment
Question by:dgd1212
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 39688158
Hi,

pls try

strFileCopyFrom = ThisWorkbook.Path & "\" & Sheets("Sheet1").Range("C3").Value

Open in new window

Regards
0
 

Author Closing Comment

by:dgd1212
ID: 39688188
Thank you!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question