#1   Report Post  
Nigel
 
Posts: n/a
Default New book from sheet

Hi,


Can anyone help me please? i need to be able to create a new book from an
active sheet to save in a location specified by user. i.e: in workbook "
invoices" on sheet number 2865 ( this sheet is active ) press a button, and a
standard saveas dialog box appears. user can browse to location and save as
new book. but it has to be the 1 sheet only. i cannot do it.


Thanks,


N.S.
  #2   Report Post  
FSt1
 
Posts: n/a
Default

hi,
try somthing like this.....

sub SaveRange
ActiveSheet.UsedRange.Select
Selection.Copy
Workbooks.Add
Range("A1").PasteSpecial xlPasteAll
Application.Dialogs(xlDialogSaveAs).Show
end sub

if you have a solid block of data you might use...
Activesheet.currentregion.select

Regards
FSt1

"Nigel" wrote:

Hi,


Can anyone help me please? i need to be able to create a new book from an
active sheet to save in a location specified by user. i.e: in workbook "
invoices" on sheet number 2865 ( this sheet is active ) press a button, and a
standard saveas dialog box appears. user can browse to location and save as
new book. but it has to be the 1 sheet only. i cannot do it.


Thanks,


N.S.

  #3   Report Post  
FSt1
 
Posts: n/a
Default

hi again,
I forgot to add.
this code should be placed in a standard module in a personal workbook. the
personal workbook should be saved to the xl start up folder then hidden.
on my pc it is c:\program files\office2k\office\XLStartup. it may have a
different path on your pc. this way the macro would be available to all
files. you can create an icon on a toolbar to run the macro quickly.
This would have to be done on each user's machine it make it available to
each user that needs/wants it.

regards
FSt1
"Nigel" wrote:

Hi,


Can anyone help me please? i need to be able to create a new book from an
active sheet to save in a location specified by user. i.e: in workbook "
invoices" on sheet number 2865 ( this sheet is active ) press a button, and a
standard saveas dialog box appears. user can browse to location and save as
new book. but it has to be the 1 sheet only. i cannot do it.


Thanks,


N.S.

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
auto numbering an exel work book sheet everytime it opens or print Rugby Al Excel Discussion (Misc queries) 1 July 19th 05 06:20 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM
Copying multiple sheets from one book 2 another and undertake spec Pank Mehta Excel Discussion (Misc queries) 14 March 16th 05 04:41 PM
How do i enable "Group" & "Ungroup" in a protected sheet Fadi Excel Discussion (Misc queries) 1 March 4th 05 05:37 PM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM


All times are GMT +1. The time now is 12:31 PM.

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

About Us

"It's about Microsoft Excel"