Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Repost for additional information
Hello
Sorry for the repost but the my OP got buried last week and Im still confused... I am saving one sheet Table! from my spreadsheet as an .xls and also as .csv with the following code... 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 In the save I want to save just the values no links, no macros, et Don Guillett (Not Bob) Graciousliy provided the following code to accomplish this but I have tried adding it in several places and cant get it to work. Where do I need to put it in my original code With ActiveSheet.UsedRang ...Value = .Valu End Wit Thanks Henr |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Repost for additional information
Maybe:
option explicit sub testme01() dim wks as worksheet dim actWkbk as workbook set actwkbk = activeworkbook with actwkbk .worksheets("table").copy end with set wks = activesheet 'in the new workbook with wks.usedrange .value = .value end with wks.parent.saveAs "\\your unc path" wks.parent.saveas "yourmapped path" wks.parent.sendmail recipients:=array("hi","there") 'no need to copy it again wks.parent.saveas "\\unc\" & ... & ".csv, fileformat:=xlcsv wks.parent.close savechanges:=false actwkbk.activate end sub Watch for typos. 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 Henry wrote: Hello, Sorry for the repost but the my OP got buried last week and Im still confused.... I am saving one sheet Table! from my spreadsheet as an .xls and also as .csv with the following code.... 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 In the save I want to save just the values no links, no macros, etc Don Guillett (Not Bob) Graciousliy provided the following code to accomplish this but I have tried adding it in several places and cant get it to work. Where do I need to put it in my original code? With ActiveSheet.UsedRange ..Value = .Value End With Thanks! Henry -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to get additional information | Excel Discussion (Misc queries) | |||
Excel Chart - additional information added | Excel Discussion (Misc queries) | |||
Conditional Formatting (Dates) Repost with additional data | Excel Discussion (Misc queries) | |||
Repost with Additional Info | Excel Discussion (Misc queries) | |||
Bringing additional information in with combo box selection | Excel Worksheet Functions |