Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default save nonactive worksheet as a seperate workbook?

Hi, I'm trying to have a non active worksheet save to a new workbook. I
am able to do what I need by using the activeworkbook command, but I
end up creating new workbooks with more worksheets then they need. What
I am doing is creating packing slips with Excel, on one sheet the user
enters the data as well as drop down lists, then each time I execute
the print macro I created, it copies the data from the user form to
where I want them on the packing slip, increments the serial number
for the packing slip, prints it, then saves a copy of the packing slip
using the packing slip number which is located in a cell as the file
name. It's working okay, I just want to be able to save the actual
packing slip file without the other tabs that have the user entered
data. I will probably turn the user portion into a form, but for now
this solution is working..minus being able to save a non active
worksheet as its own file.

Thanks to all for any help.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default save nonactive worksheet as a seperate workbook?

Worksheets("Sheet3").Move

This will create a new, single sheet workbook, which you can save.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dwayne" wrote in message
oups.com...
Hi, I'm trying to have a non active worksheet save to a new workbook. I
am able to do what I need by using the activeworkbook command, but I
end up creating new workbooks with more worksheets then they need. What
I am doing is creating packing slips with Excel, on one sheet the user
enters the data as well as drop down lists, then each time I execute
the print macro I created, it copies the data from the user form to
where I want them on the packing slip, increments the serial number
for the packing slip, prints it, then saves a copy of the packing slip
using the packing slip number which is located in a cell as the file
name. It's working okay, I just want to be able to save the actual
packing slip file without the other tabs that have the user entered
data. I will probably turn the user portion into a form, but for now
this solution is working..minus being able to save a non active
worksheet as its own file.

Thanks to all for any help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default save nonactive worksheet as a seperate workbook?

Dwayne,

Assuming your sheet is named "Packing Slip"


Dim myName As String
myName = "Packing Slip " & Worksheets("Packing Slip").Range("A1").Value & ".xls"
ThisWorkbook.Worksheets("Packing Slip").Copy
ActiveWorkbook.SaveAs myName


HTH,
Bernie
MS Excel MVP


"Dwayne" wrote in message
oups.com...
Hi, I'm trying to have a non active worksheet save to a new workbook. I
am able to do what I need by using the activeworkbook command, but I
end up creating new workbooks with more worksheets then they need. What
I am doing is creating packing slips with Excel, on one sheet the user
enters the data as well as drop down lists, then each time I execute
the print macro I created, it copies the data from the user form to
where I want them on the packing slip, increments the serial number
for the packing slip, prints it, then saves a copy of the packing slip
using the packing slip number which is located in a cell as the file
name. It's working okay, I just want to be able to save the actual
packing slip file without the other tabs that have the user entered
data. I will probably turn the user portion into a form, but for now
this solution is working..minus being able to save a non active
worksheet as its own file.

Thanks to all for any help.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default save nonactive worksheet as a seperate workbook?

Thanks Bernie, that did the trick!
Bernie Deitrick wrote:
Dwayne,

Assuming your sheet is named "Packing Slip"


Dim myName As String
myName = "Packing Slip " & Worksheets("Packing Slip").Range("A1").Value & ".xls"
ThisWorkbook.Worksheets("Packing Slip").Copy
ActiveWorkbook.SaveAs myName


HTH,
Bernie
MS Excel MVP


"Dwayne" wrote in message
oups.com...
Hi, I'm trying to have a non active worksheet save to a new workbook. I
am able to do what I need by using the activeworkbook command, but I
end up creating new workbooks with more worksheets then they need. What
I am doing is creating packing slips with Excel, on one sheet the user
enters the data as well as drop down lists, then each time I execute
the print macro I created, it copies the data from the user form to
where I want them on the packing slip, increments the serial number
for the packing slip, prints it, then saves a copy of the packing slip
using the packing slip number which is located in a cell as the file
name. It's working okay, I just want to be able to save the actual
packing slip file without the other tabs that have the user entered
data. I will probably turn the user portion into a form, but for now
this solution is working..minus being able to save a non active
worksheet as its own file.

Thanks to all for any help.


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 seperate file? George Excel Discussion (Misc queries) 4 October 30th 06 08:30 PM
Exproting Excel Worksheet to seperate Workbook [email protected] Excel Programming 1 September 11th 06 08:27 PM
macro in nonactive workbook Paul Excel Programming 1 January 1st 05 03:55 PM
copy range from each worksheet to seperate workbook Kieran1028[_10_] Excel Programming 0 November 11th 04 04:00 AM
How to save each worksheet as seperate file? Henri Excel Programming 2 February 23rd 04 10:11 PM


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"