Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to save a single worksheet as worksheet name in new folder??


Hi all,

Can anyone tell me how in vba to save a single worksheet as the
worksheets name in a new folder called statistics on the desktop or in
my documents but if the folder does not exist create it first?

Rather than save all my statistic worksheets in the workbook they were
generated in i would like to save them as a read only worksheet in
another folder, this way people can view or copy from an area where
they can have no direct influence on the workbook that created them.

Any ideas?

Regards,

Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=542456

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default How to save a single worksheet as worksheet name in new folder??

ActiveSheet.Copy
On Error Resume Next
MkDir "C:\Documents and Settings\bob\Desktop\statistics"
On Error GoTo 0
ActiveWorkbook.SaveAs "C:\Documents and
Settings\bob\Desktop\statistics\" & ActiveSheet.Name

change the location to suit

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Simon Lloyd"
wrote in message
...

Hi all,

Can anyone tell me how in vba to save a single worksheet as the
worksheets name in a new folder called statistics on the desktop or in
my documents but if the folder does not exist create it first?

Rather than save all my statistic worksheets in the workbook they were
generated in i would like to save them as a read only worksheet in
another folder, this way people can view or copy from an area where
they can have no direct influence on the workbook that created them.

Any ideas?

Regards,

Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile:

http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=542456



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to save a single worksheet as worksheet name in new folder??


Thanks for the speedy reply bob, is there any way that the statement
you provided can work on all machines i.e if it was a network machin
just put it on the desktop or if it was a personal computer with
couple of users just put it on that users desktop?

Many thanks,


Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=54245

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How to save a single worksheet as worksheet name in new folder??

on Error Resume Next
Mkdir "M:\Statistics"
On Error goto 0
Activesheet.copy
sName = "M:\Statistics\" & _
Activesheet.Name & ".xls"
Activeworkbook.SaveAs sName , xlWorkbook.Normal, _
ReadOnlyRecommended:=True
Activeworkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy


"Simon Lloyd" wrote:


Hi all,

Can anyone tell me how in vba to save a single worksheet as the
worksheets name in a new folder called statistics on the desktop or in
my documents but if the folder does not exist create it first?

Rather than save all my statistic worksheets in the workbook they were
generated in i would like to save them as a read only worksheet in
another folder, this way people can view or copy from an area where
they can have no direct influence on the workbook that created them.

Any ideas?

Regards,

Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=542456


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default How to save a single worksheet as worksheet name in new folder??

You should create an add-in, and then load that add-in on all machines.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Simon Lloyd"
wrote in message
...

Thanks for the speedy reply bob, is there any way that the statements
you provided can work on all machines i.e if it was a network machine
just put it on the desktop or if it was a personal computer with a
couple of users just put it on that users desktop?

Many thanks,


Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile:

http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=542456



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
save worksheet to a folder Hoyos Excel Discussion (Misc queries) 5 August 11th 07 05:52 PM
Save a single worksheet in Excel as a single file. Dakota New Users to Excel 4 February 22nd 06 04:46 PM
create a list of worksheet names (from a single folder, or open files) Drew Excel Discussion (Misc queries) 2 April 15th 05 04:58 PM
How do I save an embedded item from a worksheet into a folder Alan Excel Programming 2 November 24th 04 09:04 PM
save picture in worksheet into certain folder wiwi[_2_] Excel Programming 0 December 29th 03 02:39 PM


All times are GMT +1. The time now is 10:32 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"