0

My goal is to copy and paste over a sheet as values in VBA, and rename the sheet as cell 'B7' in my newly copy/pasted sheet.

So far I have managed to copy and paste the sheet with the name set as 'B7' with the following code:

Sub RenameSheets()
'Updateby Extendoffice
    Dim ws As Worksheet
    Set wh = Worksheets(ActiveSheet.Name)
    ActiveSheet.Copy After:=Worksheets(Sheets.Count)
    If wh.Range("B7").Value <> "" Then
    ActiveSheet.Name = wh.Range("B7").Value
    End If
    wh.Activate
End Sub

I am not sure how to copy and paste the new sheet over as values though, and it retains all the formulas from the sheet I'm copying from...

I appreciate any help.

Thank you.

Ken White
  • 123,280
  • 14
  • 225
  • 444
Michaelia
  • 31
  • 2

0 Answers0