URGENT! Linking cells to file name save as

S

sowetoddid

I have a file that will be updated and saved every month. Each month,
cell A1 is updated with a new month and A2 with a new year.

How can I make it so that...

When I chose File > Save As, the month and year automatically appear in
the save as field.


Please respond quickly. I have short notice.


Thanks!!!
 
F

Frank Kabel

Is this impossible??

Maybe you're pressing it just a little bit to hard. One idea (not
tested):

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim fileSaveName
fileSaveName =
Application.GetSaveAsFilename(InitialFileName:="Test.xls")
If fileSaveName <> False Then
MsgBox "Save as " & fileSaveName
End If
Cancel = True
End Sub

Replace the InitialFilename with a reference to your cell. e.g.
fileSaveName =
Application.GetSaveAsFilename(InitialFileName:=Range("A1").Value &
".xls")

just an idea, will also be triggered then just saving the file. As I
said just an idea to play with
Frank
 

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