SaveAs button - create file name and add date

simonoc

New Member
Joined
Dec 22, 2005
Messages
3
Hi

I have a template Excel form that many users have access to

They are meant to use saveas after completing the form, but often forget and the template is populate and frustrates the next user

Can anyone provide the vb code for a Save button

The code would need to create the file name from a cell reference on the sheet and then add the date saved on it. The target of the folder also needs to be included.

For example the file name is based on a customer's reference code that has 10 digits, a example file name would be

1234567890 - 221205

This needs to be saved in the C drive in a folder called Manual work / 2006

Any help is appreciated

Thanks
 

Some videos you may like

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

XLGibbs

Well-known Member
Joined
Feb 25, 2005
Messages
2,446
This sounds a little mre complicated than just a saveas button. It sounsd as if you need the sheet copied AND saved while the template file remains open..and of the existing name......

Also, we would need to know what cell reference the file names are drawn from, and if it is just one worksheet the whole workbook, just a set of data....

What have you tried so far? it is alot easier to get your attempts cleaned up than it is to just have somebody do it from scratch for you.
 

simonoc

New Member
Joined
Dec 22, 2005
Messages
3
Hi

I haven't tried anything as I have no knowledge ?

The file name would be in cell reference C4

I appreciate this is a big ask

Thanks
 

simonoc

New Member
Joined
Dec 22, 2005
Messages
3
The workbook only has one sheet, the workbook can close on saving if required
 

Watch MrExcel Video

Forum statistics

Threads
1,118,762
Messages
5,574,091
Members
412,567
Latest member
mm1
Top