Save Macro

  • Thread starter Thread starter Alan K. Martinez
  • Start date Start date
A

Alan K. Martinez

Hello, I'm not sure if this is possible or not...

Is there a way to make a macro (if you can give me exact details) save a
file based on the contents in a cell?

I have a workbook where people will enter information. Off in the distance
of the sheet is a cell that concatenates a few cells. I would like to have
a macro save the file with a name based on the contents of the concatenated
cell.


Is this possible? And how do I do it? I do not know how to write macros in
the editor because I don't know the commands and syntax. I just write the
macros with the recorder. But if someone can give me an example of what the
macro code should look like I would appreciate it.


I used to know how to do this in Lotus123 back on the DOS days of
applications. Macro development is different now... I used to know what I
was doing, but now I'm just an idiot starting over, but I'm eager to learn.
But right now I need quick results... And this is the last block of my
project...


Thanks in advance...

Alan...
 
Hi
try something like the following:

sub save_date()
Dim fname
fname = worksheets("sheet1").range("A1").value
fname = fname & ".xls"
ActiveWorkbook.SaveAs Filename:=fname
end sub
 
Thank you! Thank you! Thank you!

I cut and pasted your example, and fiddled with it a bit to see if I can
understand it and get it to do what I wanted and it worked!!!

Thanks...

Now though how do I get it to bypass the overwrite warning if the file
already exists? I'm not sure if I really want to bypass it at this moment,
but I might need to. Can you help me with that also? I'm not trying to get
anyone to do my work for me. I've done a bulk of the macro recording
already and development of the sheet. This was just last thing I had to do
at this moment... You're a life saver... thanks again...
 
Back
Top