So im copying a sheet full of formulas and i want to save the text rather that the formulas mainly due to the fact one of the formulas will delete all the text with a button click.
This is the code im using to create a new sheet just need to know what coding would be the best to add to do this.
Thanks in advance
- Dim wb As Workbook: Set wb = ThisWorkbook
- Dim ws As Worksheet: Set ws = wb.Sheets("Order Mark Off Template")
- Dim newws As Worksheet, sh As Worksheet, newname
- Dim query As Long, xst As Boolean, info As String
- xst = False
- newname = Application.InputBox("Enter Works Order Number.", info, , , , , , 2)
- If newname = "False" Then Exit Sub
- For Each sh In wb.Sheets
- If sh.Name = newname Then
- xst = True: Exit For
- End If
- If Len(newname) = 0 Or xst = True Then
- info = "Sheet name is invalid. Please retry."
- GoTo retry
- End If
- ws.Copy After:=ws: Set newws = ActiveSheet: newws.Name = newname