Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default save automatically 1st sheet only

Hi to all
How do i save automatically 1st sheet only from file and give name to that
file is the name of the sheet.

any help.

Thanks

Shah
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default save automatically 1st sheet only

Hi

try it

Sub CopySheet()
Dim wks As Worksheet
Set wks = Worksheets("sheet1")
wks.Copy
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs "c:\" & wks.Name
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"****al shah" wrote:

Hi to all
How do i save automatically 1st sheet only from file and give name to that
file is the name of the sheet.

any help.

Thanks

Shah

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default save automatically 1st sheet only

****al shah:

Another method:

ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.Path _
& "\" & ActiveSheet.Name, FileFormat:=xlExcel4


--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"****al shah" wrote:

Hi to all
How do i save automatically 1st sheet only from file and give name to that
file is the name of the sheet.

any help.

Thanks

Shah

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
Particulars data Filter from sheet 1 to sheet 2 automatically Sudipta Sen[_2_] Excel Worksheet Functions 4 September 7th 09 04:20 PM
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
save automatically Rich[_2_] Excel Discussion (Misc queries) 0 October 18th 07 11:19 AM
create a formula in one sheet that would read data from separate sheet automatically QD Excel Discussion (Misc queries) 0 December 8th 06 04:17 AM
Save automatically ldiaz Excel Discussion (Misc queries) 1 February 22nd 06 06:45 AM


All times are GMT +1. The time now is 10:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"