save command

  • Thread starter Thread starter N242NY
  • Start date Start date
N

N242NY

I have been working on this now for a few days...

I need to make a macro that will allow me to save the document usin
some of the info in the worksheet. IE...

cell H3 has a name (John_Smith) and cell B2 has a date (11-15-04).

I would like to have the macro save the file using that info as th
name of the file.
John_smith11-15-04.xls

I have not been able to come up with the formula for the life of me.
my luck it cant me done... :eek:

Can anyone help me with this... :)
-Ro
 
Hi
try

sub foo()
dim fname as string
with activesheet
fname=.range("H3").value & format(.range("B2").value,"mm-dd-yy") & ".xls"
end with
activeworkbook.saveas fname
 

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

Back
Top