AwesomeSteph
Board Regular
- Joined
- Aug 18, 2017
- Messages
- 80
I have been trying to simplify my code with no luck. What I am using works fine but to adopt the same code for more workbooks I would like it to be easier. Currently I am having the VBA evaluate some cells but I would like to have it do the same thing for the whole worksheet and I am not having any luck. Also I need to change the location of the new worksheet to save to a different folder not the one that the current workbook lives in. (This is a boilerplate with multiple forms and I need certain forms to be saved into different folders depending on what project the user is working on).
Code:
Set wbThis = ThisWorkbook
strFilename = wbThis.Path & "/" & ws.Name
ws.Copy
Set wbNew = ActiveWorkbook
If ws.Name = "worksheetname" Then
Range("B4").Value = Evaluate("B4")
Range("E4").Value = Evaluate("E4")
Range("I4").Value = Evaluate("I4")
Range("B5").Value = Evaluate("B5")
Range("E5").Value = Evaluate("E5")
Range("I5").Value = Evaluate("I5")
Range("C6").Value = Evaluate("C6")
Range("I6").Value = Evaluate("I6")
Range("C7").Value = Evaluate("C7")
Range("I7").Value = Evaluate("I7")
Range("I10").Value = Evaluate("I10")
Range("I11").Value = Evaluate("I11")
Range("C14").Value = Evaluate("C14")
Range("F14").Value = Evaluate("F14")
Range("C15").Value = Evaluate("C15")
Range("F15").Value = Evaluate("F15")