Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default More help with SaveAs

Trevor put me on the right track to save an individual worksheet
programmatically. However, I still have a problem. When I open the saved
sheet it has the formulas linked back to the parent workbook. How can I
save this with values only and eliminate the link?

Here is the code I am using:
sheetname = ActiveSheet.Name
ActiveSheet.Copy
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs filename:= _
CARTpath & "\" & sheetname & ".xls" _
, FileFormat:=xlNormal, Password:="",
WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = True

also I can't find any information about "FileFormat:=xlNormal" What other
options are availabe besides xlNormal?

Thanks
Glen



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default More help with SaveAs

Hi Glen

After the copy line add this lines

Cells.Copy
Cells.PasteSpecial xlPasteValues
Cells(1).Select
Application.CutCopyMode = False

See the Excel vba help for SaveAs

XlFileFormat can be one of these XlFileFormat constants.
xlCSV
xlCSVMSDOS
xlCurrentPlatformText
xlDBF3
xlDIF
xlExcel2FarEast
xlExcel4
xlAddIn
xlCSVMac
xlCSVWindows
xlDBF2
xlDBF4
xlExcel2
xlExcel3
xlExcel4Workbook
xlExcel5
xlExcel7
xlExcel9795
xlHtml
xlIntlAddIn
xlIntlMacro
xlSYLK
xlTemplate
xlTextMac
xlTextMSDOS
xlTextPrinter
xlTextWindows
xlUnicodeText
xlWebArchive
xlWJ2WD1
xlWJ3
xlWJ3FJ3
xlWK1
xlWK1ALL
xlWK1FMT
xlWK3
xlWK3FM3
xlWK4
xlWKS
xlWorkbookNormal
xlWorks2FarEast
xlWQ1
xlXMLSpreadsheet

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Glen Mettler" wrote in message ...
Trevor put me on the right track to save an individual worksheet
programmatically. However, I still have a problem. When I open the saved
sheet it has the formulas linked back to the parent workbook. How can I
save this with values only and eliminate the link?

Here is the code I am using:
sheetname = ActiveSheet.Name
ActiveSheet.Copy
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs filename:= _
CARTpath & "\" & sheetname & ".xls" _
, FileFormat:=xlNormal, Password:="",
WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = True

also I can't find any information about "FileFormat:=xlNormal" What other
options are availabe besides xlNormal?

Thanks
Glen





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default More help with SaveAs

See one more reply to your other post.

Similar to Ron's, but slightly different.

Glen Mettler wrote:

Trevor put me on the right track to save an individual worksheet
programmatically. However, I still have a problem. When I open the saved
sheet it has the formulas linked back to the parent workbook. How can I
save this with values only and eliminate the link?

Here is the code I am using:
sheetname = ActiveSheet.Name
ActiveSheet.Copy
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs filename:= _
CARTpath & "\" & sheetname & ".xls" _
, FileFormat:=xlNormal, Password:="",
WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = True

also I can't find any information about "FileFormat:=xlNormal" What other
options are availabe besides xlNormal?

Thanks
Glen


--

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
SaveAs Stan Halls Excel Worksheet Functions 5 November 28th 06 07:51 PM
SaveAs Bill[_19_] Excel Programming 1 January 27th 04 11:11 PM
SaveAs Steve[_48_] Excel Programming 3 November 19th 03 05:11 AM
saveas Nikita Excel Programming 1 September 17th 03 02:39 AM
SaveAs Dave Peterson[_3_] Excel Programming 1 September 12th 03 12:44 AM


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

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"