Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get additional information rlo Excel Discussion (Misc queries) 4 September 25th 09 09:21 PM
Excel Chart - additional information added Imabrit Excel Discussion (Misc queries) 0 July 8th 08 09:44 PM
Conditional Formatting (Dates) Repost with additional data BigH Excel Discussion (Misc queries) 1 January 29th 06 10:18 PM
Repost with Additional Info Sandy Excel Discussion (Misc queries) 1 September 15th 05 02:06 PM
Bringing additional information in with combo box selection JD Excel Worksheet Functions 1 February 24th 05 01:45 AM


All times are GMT +1. The time now is 11:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"