PDA

View Full Version : Solved: Copy a worksheet from excel file and save it as another new file



ram117
11-10-2005, 01:26 AM
Hi Everybody,:hi:

I have three worksheets nowI need a VBA Code(macro) such that it will copy the third worksheet and to save as a new worksheet. When the code runs Save as dialogbox should appear to save the third sheet.(It is like when we right click on third sheet tab it popus a menu in which we have move or copy to location) for the same thing I need a macro but save as dialog box should appear. Any suggestions pl. tell me.:dunno

Thanks and Regards

Ram

Killian
11-10-2005, 03:21 AM
Using the Copy method without before/after paramaters copies the sheet to a new workbook, with will become the active workbook so you then just need to show the SaveAs dialog from the Dialogs collectionActiveWorkbook.Sheets(3).Copy
Application.Dialogs(xlDialogSaveAs).Show

ram117
11-10-2005, 04:20 AM
Hi,

Thankyou verymuch Killian,

Cheers:beerchug:

Ram