J
Julz
I have the following script with replaces all formulas with values. Now
I need for the script to execute when the user selects the 'Save As'
file function. Please advise.
Sub FormulasToValues()
'
' Replace all formulas with values
'
WCount = Worksheets.Count
For i = 1 To WCount
If Worksheets(WCount - i + 1).Visible Then
Worksheets(WCount - i + 1).Select
RCount = ActiveCell.SpecialCells(xlLastCell).Row
CCount = ActiveCell.SpecialCells(xlLastCell).Column
For j = 1 To RCount
For k = 1 To CCount
Worksheets(WCount - i + 1).Cells(j, k) = Worksheets(WCount - i
+ 1).Cells(j, k).Value
Next k
Next j
End If
Next i
End Sub
thanx in advance,
~julz
I need for the script to execute when the user selects the 'Save As'
file function. Please advise.
Sub FormulasToValues()
'
' Replace all formulas with values
'
WCount = Worksheets.Count
For i = 1 To WCount
If Worksheets(WCount - i + 1).Visible Then
Worksheets(WCount - i + 1).Select
RCount = ActiveCell.SpecialCells(xlLastCell).Row
CCount = ActiveCell.SpecialCells(xlLastCell).Column
For j = 1 To RCount
For k = 1 To CCount
Worksheets(WCount - i + 1).Cells(j, k) = Worksheets(WCount - i
+ 1).Cells(j, k).Value
Next k
Next j
End If
Next i
End Sub
thanx in advance,
~julz