ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving only values (https://www.excelbanter.com/excel-programming/368301-saving-only-values.html)

sungen99[_118_]

Saving only values
 

I believe this is simple I just don’t know how to do it. Lets say I have
a file called “Maker” that gets its data for various places. I want to
SAVE this as “Maker II” but only now with the values of the cells not
the actual links.

Thank you for your help.


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=564808


Tom Ogilvy

Saving only values
 
with workbooks("Maker.xls")
for each sh in .worksheets
sh.cells.formula = sh.cells.value
next
.SaveAs Thisworkbook.path & "\Maker II.xls"
end with

--
Regards,
Tom Ogilvy

"sungen99" wrote:


I believe this is simple I just dont know how to do it. Lets say I have
a file called €śMaker€ť that gets its data for various places. I want to
SAVE this as €śMaker II€ť but only now with the values of the cells not
the actual links.

Thank you for your help.


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=564808



sungen99[_119_]

Saving only values
 

Tom, I did the following with your code but it seems to just lock my
computer up. Made this a button macro. Should it be used someother
way?

__________________________________________________ __________


Sub Button5_Click()

With Workbooks("Maker.xls")
For Each sh In .Worksheets
sh.Cells.Formula = sh.Cells.Value
Next
..SaveAs ThisWorkbook.Path & "\Maker II.xls"
End With

End Sub


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=564808


Tom Ogilvy

Saving only values
 
This might help. But I wouln't see it locking anything up.


Sub Button5_Click()
dim calc as Long
calc = Application.Calculation
Application.Calculation = xlManual
With Workbooks("Maker.xls")
For Each sh In .Worksheets
sh.Usedrange.Cells.Formula = sh.UsedRange.Cells.Value
Next
.SaveAs .Path & "\Maker II.xls"
End With
Application.Calculation = xlAutomatic
End Sub

--
Regards,
Tom Ogilvy


"sungen99" wrote:


Tom, I did the following with your code but it seems to just lock my
computer up. Made this a button macro. Should it be used someother
way?

__________________________________________________ __________


Sub Button5_Click()

With Workbooks("Maker.xls")
For Each sh In .Worksheets
sh.Cells.Formula = sh.Cells.Value
Next
.SaveAs ThisWorkbook.Path & "\Maker II.xls"
End With

End Sub


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=564808



sungen99[_120_]

Saving only values
 

Works flawlessly! Thank you Tom!


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=564808



All times are GMT +1. The time now is 07:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com