Save As B2

F

ForSale

I want to - in a macro - save the open document as whatever is i
range("b2"). what is the code for that?
Thanks,


i will also have one more question but will put in a new thread
 
F

Frank Kabel

Hi
try something like

dim fname
with activeworkbook
fname=.worksheets("sheet1").range("B2").value
.saveas fname
end with

no error checking included!
 
F

ForSale

Wonderful,
Thanks Frank.
Also, how can i modify this to save in a particular folder. fo
instance:
save as c:\Daily Group Summary Reports\fname
or something...
thanks
 
F

Frank Kabel

Hi
try:
dim fname
Dim fpath
fpath="c:\Daily Group Summary Reports\"
with activeworkbook
fname=.worksheets("sheet1").range("B2").value
.saveas fpath & fname
end with
 
Top