saving a file (with a difference)

jaypatel

Active Member
Joined
Nov 25, 2002
Messages
389
Hi

have a file (spreadsheet) on our intranet, which is accessible to everyone within our organisation. The spreadsheet is a timesheet.

The problem i have is, i would like part of my script to say:
1, email the payroll dept (this is sorted)
2, but then do a file save as, within a particular directory. But, firstly to do a check if any files exist in the specified directory, if not, then do file save as timesheet1.xls, but essentially do a count of the number of files that exist in that directory, so the second file to be uploaded will be timesheet2.xls, and the 30th file would be timesheet.xls. This is where i am struggling......(Shall we say that the new path is c:\payroll

I have worked out the Ch Dir macro part, but cannot work out if part 2 is possible.

many thanks in advance

Jay
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
sorry should have said "and the 30th file would be timesheet30.xls"

sorry for the mistake

Jay
 
Upvote 0

Forum statistics

Threads
1,203,060
Messages
6,053,303
Members
444,650
Latest member
bookendinSA

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top