PDA

View Full Version : Sleeper: Copy Paste as Values & Save as new sheet



Sharbucks
12-19-2016, 11:34 AM
Hi there,
I'm very novice with VBA, so any help with the below would be much appreciated!
I am trying to copy all the values in a worksheet ("Sheet2") and then paste them as values into a new spreadsheet and then be able to save that new spreadsheet with a file name that is equal to the value in cell A1.

I've found the below code for the latter part of the request. I also created the first part, but am not successfully able to join the two.
Any suggestions?:banghead:


Option Explicit
Sub SaveAsExample()
Dim FName As String
Dim FPath As String
FPath = "C"
FName = Sheets("Sheet1").Range("A1").Text
ThisWorkbook.SaveAs Filename:=FPath & "\" & FName
End Sub

Sharbucks
12-19-2016, 11:34 AM
FPath = "C://..."***