View Single Post
 
Old 08-07-2017, 06:58 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Both require knowing what cell(s) you've used the =TextNumber(...) formula in.

#1-- store the value of those cells in variables before copying the sheet to the new workbook then write those values to the same cells in the new workbook before saving. Try something along the lines of this in your original macro
Code:
Sub SaveInvWithNewName()

    Dim NewFN
    Dim variable1
    
With ActiveSheet
    variable1 = .Range("G40").Value
    .Copy
End With

'the newly created sheet automatically becomes the active sheet

With ActiveSheet
    .Range("G40").Value = variable1
End With

'
' rest of your code here
'
End Sub
#2-- much more complex
Reply With Quote