View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Andrea Jones Andrea Jones is offline
external usenet poster
 
Posts: 63
Default Simple macro needed to export a worksheet

Here is some code that will do everything up until providing a Save As window
for you to enter the filename:

Sub expsheet()
Sheets("Sheet1").Select
Sheets("Sheet1").Copy
Do
fName = Application.GetSaveAsFilename
Loop Until fName < False
ActiveWorkbook.SaveAs Filename:=fName
End Sub

Andrea Jones

"RobG" wrote:

Hi all

I need a simple macro to export one worksheet, including formulae, values
and all formating, to a new workbook. Can anyone help me?

Rob