Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Workbook naming

Here is what I need to do. I have any number or workbooks
open and the user can run a macro that merges all the open
workbooks into a single workbook (with a tab for each of
the open workbooks). I.e. if there were 3 open workbooks,
the merged workbook would have 3 tabs.

When I make a new workbook to hold the data from the other
open workbooks, a default name is set for the new workbook
(usually Book2.xls) I just want to change this name
without saving the workbook because the workbook needs to
be deleted shortly after it is created (and it can't be
deleted if the workbook is still open) Sadly, I could
work with this but I need to do some other tasks with the
workbook that require it to not be read only <sigh

I hope this makes sense...

~Jenny
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Workbook naming

If the workbook is not saved you don't have to delete it.
You can simple close it and tell Excel not to save

ActiveWorkbook.Close False

I don't see your code but if your code add a new workbook to
merges all the open workbooks in like this

Dim DestSh As Worksheet
Set DestSh = Worksheets.Add

'.... code

DestSh.Close False


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jenny" wrote in message ...
Here is what I need to do. I have any number or workbooks
open and the user can run a macro that merges all the open
workbooks into a single workbook (with a tab for each of
the open workbooks). I.e. if there were 3 open workbooks,
the merged workbook would have 3 tabs.

When I make a new workbook to hold the data from the other
open workbooks, a default name is set for the new workbook
(usually Book2.xls) I just want to change this name
without saving the workbook because the workbook needs to
be deleted shortly after it is created (and it can't be
deleted if the workbook is still open) Sadly, I could
work with this but I need to do some other tasks with the
workbook that require it to not be read only <sigh

I hope this makes sense...

~Jenny



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Workbook naming

Oops

I use worksheet

I mean (I need Coffee<g)

Dim DestSh As Workbook
Set DestSh = Workbooks.Add

'.... code

DestSh.Close False


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
If the workbook is not saved you don't have to delete it.
You can simple close it and tell Excel not to save

ActiveWorkbook.Close False

I don't see your code but if your code add a new workbook to
merges all the open workbooks in like this

Dim DestSh As Worksheet
Set DestSh = Worksheets.Add

'.... code

DestSh.Close False


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jenny" wrote in message ...
Here is what I need to do. I have any number or workbooks
open and the user can run a macro that merges all the open
workbooks into a single workbook (with a tab for each of
the open workbooks). I.e. if there were 3 open workbooks,
the merged workbook would have 3 tabs.

When I make a new workbook to hold the data from the other
open workbooks, a default name is set for the new workbook
(usually Book2.xls) I just want to change this name
without saving the workbook because the workbook needs to
be deleted shortly after it is created (and it can't be
deleted if the workbook is still open) Sadly, I could
work with this but I need to do some other tasks with the
workbook that require it to not be read only <sigh

I hope this makes sense...

~Jenny





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
Workbook "Sheet" Naming comotoman Excel Discussion (Misc queries) 4 September 30th 05 09:49 PM
Workbook naming Jenny Excel Programming 1 September 2nd 04 03:36 PM
Workbook naming Jenny Excel Programming 1 September 2nd 04 03:16 PM
Naming an Excel Workbook SunTzuComm Excel Programming 0 August 20th 04 05:53 PM
Workbook naming probz! aiyer[_24_] Excel Programming 1 May 13th 04 04:44 AM


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