ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save values only before save (https://www.excelbanter.com/excel-programming/297447-save-values-only-before-save.html)

Henry[_6_]

Save values only before save
 
Hi to al
Im using the following code to save one sheet of my workbook to another location and email...

Sub email(

ScreenUpdating = Fals
Worksheets("Table").Cop
ActiveWorkbook.SaveAs "\\Dfs01\shares\Groupdirs\0535\Table" & Range("B56") & ".xls
ActiveWorkbook.SaveAs "g:\data\table" & Range("B56") & ".xls
ActiveWorkbook.SendMail Recipients:=Array("My distribution list"
ActiveSheet.Cop
ActiveWorkbook.SaveAs "\\Dfs01\shares\Groupdirs\0535\Table" & Range("B56")" & Range("B56") & ".csv", FileFormat:=xlCS
ActiveWorkbook.Close SaveChanges:=Fals
ActiveWorkbook.Close SaveChanges:=Fals
ScreenUpdating = Tru

End Su

What should I add to make the saved sheets values only.... i have found this code here in the NG but I not sure if it will work or where to place it in my original cod

With ActiveSheet.UsedRang
.Cop
.PasteSpecial Paste:=xlPasteValue
End Wit
Application.CutCopyMode = Fals

Thanks


Don Guillett[_4_]

Save values only before save
 
This might be better

Sub makevalues()
With ActiveSheet.UsedRange
..Value = .Value
End With
End Sub

--
Don Guillett
SalesAid Software

"Henry" wrote in message
...
Hi to all
Im using the following code to save one sheet of my workbook to another

location and email....

Sub email()


ScreenUpdating = False
Worksheets("Table").Copy
ActiveWorkbook.SaveAs "\\Dfs01\shares\Groupdirs\0535\Table" &

Range("B56") & ".xls"
ActiveWorkbook.SaveAs "g:\data\table" & Range("B56") & ".xls"
ActiveWorkbook.SendMail Recipients:=Array("My distribution list")
ActiveSheet.Copy
ActiveWorkbook.SaveAs "\\Dfs01\shares\Groupdirs\0535\Table" &

Range("B56")" & Range("B56") & ".csv", FileFormat:=xlCSV
ActiveWorkbook.Close SaveChanges:=False
ActiveWorkbook.Close SaveChanges:=False
ScreenUpdating = True

End Sub

What should I add to make the saved sheets values only.... i have found

this code here in the NG but I not sure if it will work or where to place it
in my original code

With ActiveSheet.UsedRange
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
Application.CutCopyMode = False


Thanks!




Don Guillett[_4_]

Save values only before save
 
When I see BOB, I'll tell him.

--
Don Guillett
SalesAid Software

"Henry" wrote in message
...
Thanks Bob
This code would go at the beginning of mine?
Henry




Henry[_6_]

Save values only before save
 
My apologies Don----- No offense intended

Don Guillett[_4_]

Save values only before save
 
none taken. I was just playing with it.

--
Don Guillett
SalesAid Software

"Henry" wrote in message
...
My apologies Don----- No offense intended




Henry[_6_]

Save values only before save
 
So where do I put it in the cod
Thanks!


All times are GMT +1. The time now is 08:44 AM.

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