save file as cell value

B

Birilac

Hi, Need to save the file I am working on as the value in one of the cells
(Cell value changes)


Example. The value in cell b109 is "JohnDow"

I would like to save the file as JohnDow.xls without having to look at
the value in b109

Thanks for the help

Tom
 
D

Dave Peterson

Option Explicit
sub Testme()

dim fname as string
dim pname as string

pname = "C:\whatever\you\want\here\" '<-note the final \

with activeworkbook
fname = .worksheets("sheet1").range("A1").value & ".xls"
.SaveAs Filename:=pname & fname,fileformat:=xlworkbooknormal
end with

end sub
 
B

Birilac

Hi Dave
Thanks for the response and help.
As a new user I am a little lost. Where do I put this Option Explicit
.......end sub

Sorry to be a nuisance
Thanks again
Tom
 
Top