Open Close workbooks

HI I have a workbook that user's use to input changed data each day into 
severval different worksheets, once data is entered they have to save it as 
filename(date) what I need is a macro that will close the saved workbook and 
re-open the original.
eg saved worksheet is tallysheet28-8-05 original workbook tallysheet
0
bbc1 (29)
8/28/2005 12:09:01 AM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
552 Views

Similar Articles

[PageSpeed] 33

Hi bbc1

Look in the VBA for SaveCopyAs
Your origenal workbook stay open and a copy will be saved with the name you want

Dim wb As Workbook
Set wb = ActiveWorkbook
wb.SaveCopyAs "C:\" & wb.Name & " " & Format(Now, "dd-mm-yy h-mm-ss") & ".xls"


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


"bbc1" <bbc1@discussions.microsoft.com> wrote in message news:547EF876-9F66-4975-B00F-166E0F355211@microsoft.com...
> HI I have a workbook that user's use to input changed data each day into
> severval different worksheets, once data is entered they have to save it as
> filename(date) what I need is a macro that will close the saved workbook and
> re-open the original.
> eg saved worksheet is tallysheet28-8-05 original workbook tallysheet 


0
rondebruin (3790)
8/28/2005 7:49:40 AM
Thankyou that works great.

"Ron de Bruin" wrote:

> Hi bbc1
> 
> Look in the VBA for SaveCopyAs
> Your origenal workbook stay open and a copy will be saved with the name you want
> 
> Dim wb As Workbook
> Set wb = ActiveWorkbook
> wb.SaveCopyAs "C:\" & wb.Name & " " & Format(Now, "dd-mm-yy h-mm-ss") & ".xls"
> 
> 
> -- 
> Regards Ron de Bruin
> http://www.rondebruin.nl
> 
> 
> "bbc1" <bbc1@discussions.microsoft.com> wrote in message news:547EF876-9F66-4975-B00F-166E0F355211@microsoft.com...
> > HI I have a workbook that user's use to input changed data each day into
> > severval different worksheets, once data is entered they have to save it as
> > filename(date) what I need is a macro that will close the saved workbook and
> > re-open the original.
> > eg saved worksheet is tallysheet28-8-05 original workbook tallysheet 
> 
> 
> 
0
bbc1 (29)
8/28/2005 10:24:03 AM
Reply:

Similar Artilces:

When sending email in html format .pdf attachments can.t be opened
I am a Realtor in Florida and send a lot of emails using Outlook 2007. I want to continue using html format and send Adobe pdf attachments but the recipients tell me they receive the pdf attachments as winmail.dat and can not open the attachment. I do not want to use plain text for outgoing mail because I have photos etc. in my signature and custom stationery. This has been an issue for more than a year now. Has a fix been found for it? I have downloaded all of the MS updates (I think). In that case you are probably sending in Rich Text Format and not in the HTML format....

Net worth workbook
I am trying to set up a net worth workbook. So far I have three sheets: 1. Stocks 2. IRA 3. Total The Stocks sheet looks like this with one column for each stock and one row each month. Each month I add a new row at the top: A B C D E 1 Date S1 S2 S3 Tot 2 11/30/10 $12 $22 $31 $66 3 10/31/10 $11 $21 $31 $63 4 09/30/10 $10 $20 $30 $60 The IRA sheet looks the same except that I only get quarterly statements. A B C D E 1 Date S1 S2 S3 Tot 2 09/30/10 $3 $4 $5 $12 3 06/30/10 $2 $3 $4 $9 4 03/31/10 $1 $2 $3 $5 The Net Wor...

Cen an Excel file be set up to no longer open after a certain date????
Any help would be very much appreciated. Is there a way to set up an excel file to not open after a certain date or after a certain amount of time? Thank you in advance!! Lou Blah wrote: > Any help would be very much appreciated. > > Is there a way to set up an excel file to not open after a certain > date or after a certain amount of time? > > Thank you in advance!! > > Lou This could be done with a VBA Macro but you would have to take security measures to keep the user from tampering with the code. Maybe even incoporate code that deletes all of the data includ...

Personal workbook does not save when it changes
I am using XL 2002. I created a Personal workbook, put it in the XL startup folder, and hid it. But when I add a macro to it, I am not prompted to save it when I shut down XL. Why? Thanks, Billy When you start Excel and click on Windows - Unhide, does the Personal.xls file appear? Or is Unhide grayed out? I don't know how you created that file but you should let Excel create it and place it. To create the file, click on Tools - Macro - Record New Macro. When it asks where to place the macro, specify Personal.xls. I know it doesn't exist. Click OK. That's ...

open access form from outlook
I am sending the user an email from my form. Is there a way to pass something to the user through the email so they can click on it to open the form on the correct record? I have tried a few things that work on the run command, but when I use outlook it does not work. I'm not sure if it is virus protection stopping it or what. Thank you in advance for any help you can provide. Cynthia No, that will not work. You Access application which contains the form and the data is running on your computer. -- Dave Hargis, Microsoft Access MVP "Cynthia" wrote: > I am sendin...

hyperlink in Excel to Word doc closes Excel doc
Clicking hyperlink to a word document in my Excel workbook work only once. Every other time the excel document closes as the word document opens??? This is obviously annoying, because I want to go back and forth between my multiple documents Are you using xl97? If you are, try making a change to a cell (any change, any cell), then click the hyperlink. (Selecting a cell, hitting F2, then enter may be enough of a change.) I think that if excel sees your workbook as "dirty" (needing a save), then it won't close. Hyperlinks close Excel Document wrote: > > Clicking hype...

Office programmes not opening
Found a posting relating to this matter. Recommended installing an update etc etc. Did the trick. Took about 5 minutes all in all. Spent about 2 hours on the phone to Apple support and then Microsoft support and got NOWHERE!!!! I now know where to turn in future. Gary Thanks for confirming this. Microsoft is being very slow to disseminate this information to their phone people, and Apple is trying its damndest not to admit they broke things with their update :-) On 16/7/07 7:19 PM, in article 1184579373.007365.272280@i13g2000prf.googlegroups.com, "Gurrischwarma" <gurri1...

Can't open file
Hi all. We are having a problem with a site using Outlook 2003 SP2 and Windows XP SP2 when they drop an email onto the desktop the subsequent .msg can only be opened once. If you open the .msg file again you get the error message "Can't open file: c:\Desktop....\xxxx.msg. The file may not exist, you may not have permissions to open it, or it may be open in another program" Well, it's not a permissions issue and the file does exists so it only leaves something holding it open. It's like Outlook is not releasing the file when you close the email display screen. ...

Opening large .csv files (over 65,536 lines) with Excel
Hey guys, First my apologies if this has been answered sometime before, but this is a VERY large newsgroup. I have some large .csv files that don't load completely into Excel because they are over 65,536 lines. Is there a way to split the file up, or another program/plugin that will let me view the whole file at once? Thanks in advance, Albinus. Well the classic answers are: -Use Access. -Chop the file up into smaller files with a text editor. -Use a macro. Here's MS's macro. I've never tested it; it might be pretty slow. http://support.microsoft.com/default.aspx?sci...

Closing opportunity error
When I try to close an opportunity, I am getting an error message instead of the 'close opportunity' web page dialog. It seems that the error relating to an invalid value (null) from the database. A user with admin rights Added, deleted, and changed the opportunity form fields multiple times. He also deleted all 'Status Reason' field values and later added custom them back. (Setting -> System Customization -> Opportunities-> Customize Form -> Administration tab -> Status Reason Field Properties -> Values tab.) I think that the error has something to do with...

how ,programatically we can open a file dialog box
hi How,programmatically,we can open a file dialog box. My probs is 1. On click of some menu ,I want to open dialog box ,which contains all files. 2. I want to open file dialog box ,which contains file without any extenstion. Arbind hi, Arbind wrote: > hi > > How,programmatically,we can open a file dialog box. > > My probs is > > 1. On click of some menu ,I want to open dialog box ,which contains all > files. > > 2. I want to open file dialog box ,which contains file without any > extenstion. > > Arbind > > You c...

Opening *.pub file on CD
I've saved a large Publisher file with linked images to CD, but when I try to open it from the CD, it either hangs up the system, or Publisher is hanging up, and I need to shut the system off to reboot and recover. If I recall correctly, it is either Publisher 2000 or 2001. If I copy that file from the CD to the HD, it loads fine. Am I doing something wrong, and if so, what? Also, is there a way to change the path to linked images manually, without physically moving the image itself, then using the "change link" feature, which appears to want to browse to the new location? Tha...

Unable to open money
I installed Money 2004 in September on my new Dell computer. It has worked flawlessly - until last week! Now, when I attempt to open it I get: "Unable to initialize a required Money component. Please reinstall Money from your original product disks." When I click on the "OKAY" box, I get: "Do you want to check the installation of Money 2004?" When I click on the "OKAY" box, I get: "Finished! Money 2004 Installation Checker did not find any problems with this installation." When I click on the "OKAY" box, it closes. I get ...

Why doesn't the spreadsheet file open.
Excel2000 on WinXP home SP2. When opening an xls file nothing happens. Only when I look at Show-Window (in the standard toolbar) the file is shown. When I here choose the file it will open correctly. How can I make it open in first go? The spreadsheet file contains macros and links to other spreadsheets, but has worked fine for several months. Computer is protected and updated both with antivirus and firewall. Even tried to reinstall office - but in vain. Help, anybody? It's possible that you simply need to use window/arrange, then click Tiled, and Windows of active worksheet...

how do I disable the EULA message each time an Office app opens
Each time I open an office app,ie WORD, Excel; the EULA message to Accept or Decline appears and needs to be answered before the app opens. How does one stop this from coming up each time? ...

preventing a workbook being changed? (not as simple as it sounds!)
i am trying to prevent anyone being able to make changes to a workboo and something strange is happening. Ive put a password on the workbook by going to tools/options/securit and adding a "password to modify". now in theory this should prevent anyone ever being able to change m workbook without knowing that password. however ive had the workbook put onto the intranet, clicking the lin to it opens it in IE. if i make some changes in the workbook and the click the back button in IE, i get prompted to save the workbook due t changes. I can then click save and save the workbook to m...

Opening a Word Template from within Excel
I have the following VBA code with opens a Word Template (.dot extension) from Excel: 1. CommandButton1 code on worksheet -- Private Sub CommandButton1_Click() SQLRollup DeleteBlankRows RollupToSQLServer1 InsertTrackingSpecificData frmClients.Show End Sub 2. Code on frmClients Private Sub cmdProposal_Click() frmOrders.Show frmClients.Hide End Sub 3. Code on frmOrders Private Sub cmdManaged_Click() 'opens a new Word Template Dim wordApp As Word.Application Dim wordDot As Word.Template Set wordApp = New Word.Application On Error ...

SDI App File | Open twice
I noticed a problem in the app that I'm writing - I can open a document and CMyDocument::Serialize get's called. But if I try to reload the same document while it is already loaded, I can't get the framework to call Serialize the 2nd and subsequent times. What I'm trying to do is make it possible for the user to be able to revert to their original settings by reloading the file. But apparently there's some problem with trying to load a file that is already loaded. It seems like closing the file (with modified flag turned off first) then reopening it should solve the pro...

Problem with opening
It is happened something very strange to one mine file. I can open and edit the file without any problems, but if someone else try to open the file excel perform an illegal operation and it close. Any suggestions what the problem can be? Thanks in advance, Emilija ...

Open worksheet by date
I have a workbook which contains twelve worksheets - January, February............., December. I would like to have the active worksheet upon opening correspond to the current month. E.g. if the workbook is opened in March then the "March" worksheet displays. How can I do this? Sandy Sandy, Copy the code below and paste it into the Thisworkbook object's codemodule. HTH, Bernie MS Excel MVP Private Sub Workbook_Open() On Error Resume Next Worksheets(Format(Date, "mmmm")).Activate End Sub "Sandy" <sandy_stephen@DELETEhotmail.com> wrote in messa...

Opening text file using Excel
When I choose Microsoft Excel Program to open a text file I get thi error "This file does not have a program associated with it fo performing this action. Create an association in the Folder option Control Panel" I used to open it few days back But I don't know what happened :-( al of a sudden it stopped working. I uninstalled and reinstalled O2k Pr with SP1 & SP3 still not working. Can someone help me out on this one. Thanks Addian -- Message posted from http://www.ExcelForum.com Hi If you right-click on the file, you should get an 'Open with . . ' option. Cli...

Directing Access to open a file...?
Hello, My business has recently switched to DVD format, and I've undertaken a project of indexing and archiving a bunch (~400) magneto-optical disks that are packed with a plethora of information. I've decided that re-uploading all information from these MO disks onto the new DVD's is far too timely of a project. I'm going to rather keep a dedicated PC with the proper drive to open these MO's and store them away until the need arises. However, in order to pinpoint the disk I need to find when a case pops up in my query, I'm going to simply print a screen that contains...

Publisher 2002 wont open 2000 files
I have installed at least 150 copies of Publisher 2002 at our company and no one can open Publisher 2000 files which means all of their files, as they were all created in version 2000. I have read the newsgroups and we do not have the usual problems such as Norton, we use InoculateIT etrust. The only way I have been able to open these files is by loading version 2000 on my machine. To put it mildly, people are very upset. Is there anything I can do short of uninstalling 2002 and reinstalling 2000? both service packs 1 and 2 addressed some version issues. have you been installing the 20...

Name Conflict window pops up, when I try to open a saved worksheet
I keep getting this window and no matter how i try to rename it , it wont let me, but it wont open -- w ...

unable to open
This morning when i tried to open outlook a norton message popped up saying i was infected with sasser and i am now not able to open outlook. When i scan for the virus with microsoft's check my pc it says i am not infected but i still can't open outlook. what gives? lol, sean shaun close your computer down and re boot it, then once it has finished re booting run your scan program. to make sure this is affective be sure to deleat and junk mail or un important e-mail in your server. ...