remove old versions of file

W

ward376

I need to update a workbook periodically and would like to find and
remove old versions of the workbook, on any drive the user has access
to when they open this new file. I just want this code to execute the
first time the workbook is opened by a particular user. I'll be sending

the workbook as an email attachment and have it available on a shared
drive. The workbooks are named similarly; workbookv1, workbookv2, etc.
 
T

Tushar Mehta

I need to update a workbook periodically and would like to find and
remove old versions of the workbook, on any drive the user has access
to when they open this new file. I just want this code to execute the
first time the workbook is opened by a particular user. I'll be sending

the workbook as an email attachment and have it available on a shared
drive. The workbooks are named similarly; workbookv1, workbookv2, etc.
You plan to delete files that might have been updated by other people? And,
do so without warning or recourse?


--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
T

TC

Uh:

- Tom has the current version of the workbook, named "Feb 2006.xls", on
his hard disk.

- Dick has saved a copy, unaltered, as "BACKUP 2006 -- FEB.xls".

- Harry has an edited version, which he has saved as "Harrys
Spreadsheet.xls".

You tell me - how will any program code, realize that those three files
are original or edited versions of the same workbook?

TC (MVP MS Access)
http://tc2.atspace.com
 
W

ward376

It's not really a spreadsheet, it's a housing for some parameter
queries and some code to spit out a date/time stamped subset of
records. Needs change and updates are required. I'm experiencing issues
with users not using the latest file. On inspection, I've found users
using files several versions back or using multiple versions and not
even being aware. (Picture a desktop covered with icons with truncated
file names) Sharing a workbook has only caused headaches for me in the
past. If anyone can share a positive experience I'd be interested in
hearing about it.
Of course if they've changed the name of the file it won't be found,
but most of them can't find a file that's not on their desktop or in
their recent docs and I almost have to have the userform reach out and
give them a titty-twister to get them to select the appropriate
parameters and click run. Which is really the cause of all this.

I put the code together myself to delete the old versions using
filesearch. I'm using a custom file extension going forward along with
a naming requirement to stop the code if the filename is changed.

Sorry for the rant. I understand your concerns and I won't post the
code.
Thank you for responding.
 
T

Tushar Mehta

Consider alternative ways to write and distribute code that does not
require blaming users for something is completely within your control.

Lose the inane concept of naming your files v1, v2, etc.

Distribute the code as an add-in.

Create a easy-to-understand interface to your software.

You'll be amazed at how competent people are when given properly
designed software.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2005
 
W

ward376

You're right. This is another iteration of my first widely distributed
project and I'm learning a lot the hard way. Mostly what I've learned
is how much I don't know. In the past, I've only used VBA for myself or
1-7 other people I worked closely with.

I used the version naming convention as most other software - Lotus
Notes 6.5, Excel11, Acrobat 7.0, etc. As requirements evolve, do you
have another model? I really would be interested to know.

As I said, I'm new to this and I've never developed an add-in before.
Will there be similar issues with implementing new versions of the
add-in and ensuring that it is installed, loaded and used?

The interface is as simple as possible, a short instructional
paragraph, a date (tomorrow as default, exactly what's needed over 70%
of the time), a database name (5 choices from a combobox) and a
specific, two-digit number (acquisitions and realignment keep this a
textbox for the foreseeable future). They're all labeled clearly and
share naming conventions used day in and day out by these users. The
interface has only been an issue a couple times with particular users
and I only mentioned it because of how much it exasperated me when it
was.

I would love to be able to produce a project (or projects!) that would
fit the description "properly designed software". I will continue to
develop myself.

This all started so simply. "VBA Development" is nowhere in my job
description, but people knew I could do it and when they came to me
with this issue after they saw a couple Access projects developed by
others blow up, I said, "Sure!" They were all impressed that it
actually worked; now I'm expected to whip things out in a moments
notice. Don't get me wrong, I really like this kind of work and will
continue to pursue it but it doesn't reduce my primary workload (well,
ok it does save time when it's finished but the develop time is tough
to come by.) As it is, I do it before and after work, on weekends and
vacations.

Thanks for your interest and I do take your comments to heart. I just
glanced at your website - nice. I'll be in the relational database
section frequently I'm sure. (And others, ASAP) I don't know how I
missed it in the past.

I truly appreciate that someone with your credentials and
accomplishments would take the time to respond.

Thanks!

Cliff Edwards
 
T

Tushar Mehta

You make good observations and ask good questions. I will be happy to
share with you how I handle "version" issues. However, it will have to
wait for a day or so.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Multi-disciplinary business expertise
+ Technology skills
= Optimal solution to your business problem
Recipient Microsoft MVP award 2000-2005
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top