I would copy the sheet to the desktop and save as and close

Sub CopyDetailsToDesktopSAS()
mydesktop = Environ("userprofile") & _
Application.PathSeparator & "Desktop" & _
Application.PathSeparator

mypath = ActiveWorkbook.Path

With Sheets("Details")
.Copy
  newname = .Name & " - " & Format(Date, "mm-dd-yy")

With ActiveWorkbook
.SaveAs Filename:=mydesktop & newname & ".xls"
.Close
End With

End With
ChDir mypath
End Sub
From: Mr Excellent 
Sent: Thursday, September 22, 2011 12:29 AM
To: excel-macros@googlegroups.com 
Subject: $$Excel-Macros$$ Export Data

Hi Group

I have a spread sheet which has 3 TABS and the last tab is saved with the 
required information and i need a VBA code for exporting only the TAB named as 
"Details" to be exported on my desktop with xls format and file which has to be 
saved should be named as "Details - Present Date( DD-MM-YYYY).xls"

Could anyone help me on this.

Thanks
Prasad
-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to