View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter Rooney Peter Rooney is offline
external usenet poster
 
Posts: 325
Default export file to excel

Hi, Owl,

Could you use the following:

Sub SaveSheetToNewWorkbook()
ThisWorkbook.Worksheets(1).Copy 'copies it to a new workbook
'the new workbook is now active
ActiveWorkbook.SaveAs "Saved Copy"
End Sub

This will save worksheet(1) to a new workbook called "Saved Copy".xls

Hope this helps

Pete
"owl527" wrote:


hi,
How do I export a range of data from one excel file, to a new excel
file with a specific file name? is it possible? or I can only export
data to a text file? pls let me know. Thanks.
'


--
owl527
------------------------------------------------------------------------
owl527's Profile: http://www.excelforum.com/member.php...o&userid=20916
View this thread: http://www.excelforum.com/showthread...hreadid=552575