save as cell reference

V

Vato Loco

I have an invoice that references contract information and populate
itself when opened. This is used by many different agents in my office
I am trying to get it to save to a specific drive, (J:drive), and
want it to save automically when the document is sent via faxcom.
have been using a macro button to print and save, but i cannot get i
to automically change the name when opening.

The document is called Builders Choice Invoice and I want the cel
containing clients name (g18) to automatically be the new filename.

Can this be done? Please help.

Thanks, Vat
 
B

Bob Phillips

save it on close

With Activeworkbook
.SaveAs Filename:=.Path & "\" & Range("G18").Value & ".xls"
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
V

Vato Loco

Thanks, Bob,

I pasted that in as a module and it is not working, could I be doin
something wrong
 
B

Bob Phillips

It works okay for me. What do you get?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
P

PegL

I believe it needs to be in the Workbook_BeforeClose
event procedure, which needs to be in This Workbook.
 
V

Vato Loco

It works...I love it! The only thing is that the debugger runs at th
end. (Run time error 1004) it says. How do I shut off the debugger o
get rid of this?

Thanks alot, this is gret
 
Top