Control Name when New workbook opened from a template

How can I control the name of a new workbook opened from template?
Such as using MyWorkbook.xlt to open MyWorkBookToday.xls instead of 

SC from Lubbock, Texas
11/25/2009 3:54:16 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 33

The name of the file (including the extension) is set when you (or the user)
saves the file.

I don't think you can control how excel names workbooks that are created based
on template files.

Well, you could provide a macro that creates the file and then saves the file
with the name (and location) you want.

SC in Texas wrote:
> How can I control the name of a new workbook opened from template?
> Such as using MyWorkbook.xlt to open MyWorkBookToday.xls instead of
> MyWorkbook1.xls.
> Thanks,
> Steve
> --
> SC from Lubbock, Texas


Dave Peterson
11/25/2009 5:26:29 PM
It can be done but what if you open the Template more than once per day?

This code placed in Thisworkbook module of MyBook.xlt will immediately save
the copy as mybookmm-dd-yyyy.xls but if a copy with that name already exists
what do you want to do?

Private Sub Workbook_Open()

If ActiveWorkbook.Path <> "" Then Exit Sub
'allows you to open a saved copy without renaming

'names and saves newly opened copy
ActiveWorkbook.SaveAs Filename:= _
        "C:\Program Files\Microsoft Office\Exceldata\mybook" & _
        Format(Date, "mm-dd-yyyy") & ".xls", FileFormat:= _
        xlNormal, Password:="", WriteResPassword:="", _
        ReadOnlyRecommended:=False _
        , CreateBackup:=False

End Sub

Gord Dibben  MS Excel MVP

On Wed, 25 Nov 2009 07:54:16 -0800, SC in Texas
<> wrote:

>How can I control the name of a new workbook opened from template?
>Such as using MyWorkbook.xlt to open MyWorkBookToday.xls instead of 

11/25/2009 6:24:13 PM

Similar Artilces:

bound control or inbound control
Hi Katherine, There are differences between using bound versus unbound controls. Where on the form do you want to use an unbound control? Jeanette Cunningham "Katherine" <> wrote in message > ...

why won't word 2007 release control of a .rtf file after exiting w

RE: Control
Can some one point me right direction to achive this following. Need to dispaly a data in a table format. some of the column data may have to display a image/icon based on a value from the table (1 :- Red color icon, 2:-yellow color icon...) Once the data is loaded and displayed on the format , able to search particular row by column index and update the values including the images(change different image). I tried with Listview control, with the report view I am not able to search row and update the columns with the List vew I am not able to show the image/icon. do not want to use ...

Problems with add new field
Hi I want add new field to the opportunityproduct object but I get the follow Error in the Eventlog. dmLog: Failed to grant access to the regenerated view OpportunityProduct after inserting new attribute 'attributename' Source: DMSAPIN I'm login as local administrator with crmroll 'systemadmin'. Note, in other object's I can add new fields. Why I get these Error and how can I solve it? thanks Harald ...

names pop up in the to field
does anyone know how to configure outlook so a name pops up in the "to" field when you start to type in the beginning letters of the name? To my knowledge, no Outlook versions do this like Outlook Express does. Try typing the unique characters of a name (i.e., "quig" for Quigley), and hit Ctrl+K to get a list of anyone with that specific string of characters in their friendly name or email addy. <-*-><-*-><-*-><-*-><-*-><-*-><-*-><-*-> Hope this helps! Anne Troy (better known as Dreamboat) Author: Dreamboat on Word Email: ...

Next "available" File/Folder Name,...
Hi, i am looking for some API that will give me the next available file/folder name if the file/folder aleady exists. Example: you have a file named "New Text.txt", o the operating system suggests here "New Text(1).txt" if you create a new file within the shell. Is there any API that could give me the next available name for a file if i provide a filename as input? I guess its some shell interface or function, but i could not find anything so far,... Thanks in advance,... Regards Kerem -- ----------------------- Beste Gr�sse / Best regards / Votre ...

How do I create a formula that displays the tab name in Excel?
See Bob's site -- Regards Ron de Bruin "fazeez01" <> wrote in message > You'll need this Excel add-in: After you install it, just use the SHEETNAME() function. Example: =SHEETNAME(1) would call the first tab in your workbook. Hope this helps. -- AlexJ ------------------------------------------------------------------------ AlexJ's Pro...

MSCRM login and the Users Control Panel
Is anyone aware of any way that the settings stored under Control Panel - Users - Password Management might interfere with the process of Single Sign On into MSCRM? It seemed to have somehow cached someones login and prevented logging in as the logged in user, until cached credentials had been "deleted". However I have never seen this mentioned as being relevant. I am not too sure what the architecture model is there, but it appears to be a single domain. If this area has any relevance, it would be useful to know....thanks ...

custom formats in new sheets
Hello all, Excel2000 I've got some custom formats which I use in pretty well all my spreadsheets. Is there a way to make user-defined custom formats appear in new sheets? When I start a new sheet there are always the standard set of 'custom' formats but the ones I have defined and want to use have to be set up again for that sheet. I'm sure ther is a simple answer to this, something I've been getting by with for over ten years! Actually, related to this question: there are loads of 'custom' formats defined in Excel which I never use but have to scroll through ...

Can I use 'names' in defining a series in a graph
I have successfully used the name feature to name individual cells and ranges of cells and than have used them in formulas. However, when I try to use a name in the definition of a series on a graph, it says there is an invalid reference. Am I doing something wrong, or can you not use names in series definitions? Thanks for your help. There are innumerable examples on the internet showing how to use names as your chart source data. See for example: What is probably leading...

New to Publisher
I just got Publisher 2007 and Im completely lost. Im used to working with FrontPage but have been advised to switch by my provider in spite of my personal feelings about it. I got my page all built but cant figure out how to publish it to my already established website. Thank you for your help, its probably very simple if you know how to do it. There is no need to switch from FrontPage to Publisher to build your website, in spite of what your 'provider' told you. In fact, though I am the first one to defend the use of Publisher to build websites under some circumstances, I ...

Adding a control variable
Hello all, Under VC++ 7.1, I've added a checkbox to a dialog. Using the dialog editor, I am not trying to add a control variable for this check box. However, when I right-click on the check box and select "Add Variable", the resulting wizard dialog does not allow me to select "Control Variable" (it is grayed out). What do I need to do to get a control variable for this check box added to my class? Thanks, Dave I've never seen that before - are you able to duplicate this problem with other projects too? -- Regards, Nish [VC++ MVP] "Dave" <bett...

Spam control - MS Outlook
Hi! I am using MS Outlook 2000 and use 2 profiles. I recently installed a firewall package (Fsecure = Telia S�ker Surf), including Spam control. After install, MSO hangs and I cannot change to the other profile (if I not removed MSO by ctrl/alt/del) Somebody want to comment this? /Sven-Erik Intergrated AV/Spam is the cause of frequent issues in Outlook Is the FSecure you installed compatible with this old version of Outlook? "Storfille" <> wrote in message news:b1Ixm.11987$ > Hi! > > I am using MS Outlook 200...

Where can I find the icons for "create new file" etc ?
I am writing a training manual for Publisher and need to insert the icons fo various Microsoft functions. I have searched online but must be using the wrong words. I want the little pictures of say a file with a star on the top right side etc. -- Mary Sauer MSFT MVP news:// "RRDTC in Lao PDR" <RRDTC in Lao> wrote in message >I am writi...

Releasing memory after creating OCX control
Hi, I try to create an instance of an activex control in my MFC dialog based app. Though my application works with out any error, if i check the memory after calling "delete pMyControl" it keeps on occupying the same memory it occupied when the control was alive. Could anyone help me where I am missing to clear the memory? Thank you. My Code here ---------------m_pxWmp= new CWMPPlayer4();if( m_pxWmp->Create("replay", WS_CHILD | WS_BORDER | WS_VISIBLE , CRect(100, 100,320,240), this, 2)){ m_replay = true; m_pxWmp->SetUrl("C:\\video.avi"); m_pxWmp->Set...

what control can display characters from txt files in a dialog?
I want to read lines from txt files and display them on a dialog.I wonder which control can be put into the dialog to hold the characters from txt? Something like :- while(m_file.ReadString(tmpstr)) { str += tmpstr; } m_edit.SetWindowText(str); -- Regards, Nish [VC++ MVP] "liao_xf" <> wrote in message news:001401c3652f$177b9830$a001280a@phx.gbl... > Thanks first! > I know that Edit control can receive and edit input. > and I know the filestdio can read lines from txt. > but can you tell me how to attatch the lines to the edit? > Thanks!...

stock control system
trying to see up a 'basic stock control sytem' for a warehouse that contains building materials. -- Thank you. You can use multiple ways of doing, there's 3 ways to come to m head... 1) Use a worksheet as database an save all the information on the cell of that worksheet using some macros to access it and handle. 2) You might want to use Access instead of Excel, I think would b easier to handle the database portion and you still have the Macro available. 3) You can use VB with an Access to create an application -- fanay ------------------------------------------------------...

adding new identity to outlook
I have successfully added an account to outlook, but an now attempting to add my husband as a new identity. I thought that I did this correct but when I sent a test email, it came to my mailbox. I believe that the problem lies with the incoming POP3 server info. and the out going SMTP server info. For my account I typed in the incoming server and the outgoing as Because this is the second identity, do I need to add a "1" to this info.? I am so frustrated, can anyone help with this? I have exhausted the Help Menu! Thank you! what v...

Creating dialog controls at run-time
I've been researching how to do this, but whenever I try what other people do, I get very bad results. But my challenge doesn't end there. The number of controls I want to create is only known at run-time. The problems I face are manifold: 1. The code most people use fails badly. Not only is the font unconventionally big, but when I click the checkbox I create, the whole dialog disappears. If that's not enough, the pointer to the control is NULL when the dialog's destructor is called, so I can't delete the instance, and get a memory leak message when the program ends: CADi...

Set new message to "Justify" format...not Left??
Greetings, I was wondering if there was a way to have a new mail message automatically be set up for "Justify" instead of "Left" for paragraph formatting. I'm using Outlook 2003 Thanks in advance Are you using Word as the Outlook message editor? -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How to ask a question: After furious head scratching, asked: | Greetings, | | I was wondering if there was a way to have a new ma...

cannot open email attachments
After I open a message with an attachment I get a message that says file is corrupt. If I right-click on the message BEFORE I open it and click on View attachment it opens fine. Why does it give me the corrupt message when I try to double-click the attachment after opening the message? ...

MDI support in ATL composite control
Hi, I have components created in ATL. The components are ATL composite controls. Entire work has been done till now using ATL, however I now need to give MDI type of work area (based o doc-view architecture) within the control. I have class derived from CMDIFrameWnd. However when I try to initialize instance of this class by calling "Create" method of CFrameWnd (base class in CMDIFrameWnd), I get error and creation fails. Tracing the code, I found that base class create method calls "AfxGetInstanceHandle" to get handle to the DLL. Now since this is ATL Composite control, ...

View Filtering and Access Controls for Business Units
I am trying to implement MS-CRM for my company. We have multiple Business Units . I need to give views to each Business Units so that they see only their own Contacts/Accounts/Opp lists. How do I accomplish this ? Also, If I gave inter business unit acesses , how do I make sure that the one business unit users can not modify any fields on other's Business Unit's records ? Thanks in advance for any help, Kishore This is quite easy to do with CRM. Assuming you have already created your Business Units in CRM, you can view a security role within one of the Business Units and a...

outlook can't open
I managed to install SP3 to the computer (running Office XP) and XP Pro OS. It allowed me to go from no Outlook, to opening Outlook but it still can not access any e- mails. "Unable to open default e-mail folders. The information store could not be opened." The problem may have stemmed from when I deleted the "shortcut" from the desktop. It said I would lose some functionality, but I didn't believe it. I restored it, but have not received full functionality back. It can open and I can use it as a file manager, but that is it. Any ideas all you experts???...

FULL NAME in contacts not populating FIRST NAME and LAST NAME corr
I have Office XP with Outlook 2002 SP3 installed and whenever I type a name in to the FULL NAME field on the contacts form, the form puts the first name in the LAST NAME field and the last name in the FIRST NAME field. For example entering "John Smith" in the FULL NAME field and pressing the FULL NAME button results in the CHECK NAME FORM displaying Smith as the FIRST NAME and John as the LAST NAME. This happens no matter what the settings are in the FILE AS box. It seems to me that you should be looking at the settings you specified for the Full Name field, not the File As...