PCG FAQ

[Use your browser's BACK button to return to the PRIME FAQ Page or click here if you came directly to this page.]

We wrote this FAQ to answer the many questions we receive on this topic from our clients and other inquiring minds in the many electronic communities we frequent.

TimeIt! Saved to Another Filename and the Start TimeIt Toolbar Button Now Looks at the Wrong File

Q: I am using TimeIt with great success, except for backing up my TimeIt data. When I copy the TimeIt.xls file to my floppy drive, the code changes for the Start TimeIt toolbar button. The result is the next time I attempt to start the program, it looks at my floppy drive for the file. I just want to back up the data in case of a hard drive crash.

Q: I accidentally saved my TimeIt.xls file as another name. Now the Start TimeIt toolbar button points to the wrong file. How do I fix things to look back to my original file when I click on the Start TimeIt toolbar button?

A: (Quick introduction for readers not familiar with TimeIt ... TimeIt is a time tracker project we developed using Excel VBA for Office Computing's cover story in issue 4 (October 1997). TimeIt logs the hours spent on a client or a task, and then crunches the data so you can analyze and maximize your performance. Find out more about this and other article's we've done on our Resources page.

Here's what is happening. The TimeIt toolbar's Start TimeIt button is probably pointing to an invalid/undesired path (in the case of a save to a floppy disk, it's A:\) for the StartTimeIt macro. To fix things follow these steps:

  1. Start Excel.
  2. Make the TimeIt toolbar visible if it isn't already (View / Toolbars / TimeIt).
  3. In the case where you saved to a floppy, open your hard-disk copy of TimeIt.xls. In the case where you saved TimeIt.xls to another filename, open the original TimeIt.xls you used to perform the File / Save As operation.
  4. Tools / Customize / right-click on the TimeIt toolbar's Start TimeIt button / choose Assign Macro / choose "This Workbook" in the "Macros in" drop-down list / click the StartTimeIt macro in the list / OK / Close.
  5. If you want to test it, go ahead and close TimeIt.xls (or even Excel) then click the Start TimeIt button. Now it will open TimeIt.xls (if it's not already open) and fire up TimeIt.
Why does this happen? Excel internally remembers where a file was last saved and flips (without telling you, unfortunately) the path for the pointer behind the custom toolbar button (the button that tells TimeIt to run the macro TimeIt.xls!StartTimeIt) to A: in the case of a floppy save, or a different filename if you saved it to another filename.

Another Excel behavior that you should understand is that all Excel toolbars, custom or otherwise, get copied into your .xlb file, which is Excel's own proprietary toolbar management file. The .xlb always "wins out" over any local workbook same-name toolbar objects. This may seem counter-intuitive, but that's how Excel is designed. Regardless, by explicitly following the above steps you'll update your .xlb file and all will be fine from that point on.

One last variation, just so you're aware of it. The "long way around the barn" trick is to tell the custom toolbar button the precise path on your hard disk where a specific macro lives. If, for example, your hard-disk based copy is:

C:\Backup\Trash\TimeIt Test\TimeIt01\TimeIt.xls

then do this: Tools / Customize / right-click Start TimeIt button / Assign Macro and type in exactly this:

'C:\Backup\Trash\TimeIt Test\TimeIt01\TimeIt.xls'!StartTimeIt

then OK / Close. The problem with this approach is that every time you choose File / Save As, this disruption will occur. The solution is: don't save the file to a floppy backup from within Excel; do it from Windows Explorer instead. We took you the long way around the barn here just so you could see what was happening behind the scenes and understand what Excel's doing.

The Naked PC
Subscribe to our free electronic newsletter. Get the latest on all things PC, updates to PRIME Freeware page, and more. Type your email name and click Subscribe.

Return to Top