Using cell data as file name

  • Thread starter Thread starter huntnpeck
  • Start date Start date
H

huntnpeck

I've created a template for financial analysis and approval for my
sales force. One of the fields is a Quote Reference in which the user
can input any data that they want. The objective being that they begin
the process with a financial analysis, deliver the analysis for
approval, and provide a quote using the same data and Quote Reference.

I'd like to be able to use the data in the Quote Reference field as the
filename and create a button that will automatically use that data to
name the file when clicked.

I'm a complete noob to VBA, but otherwise quite experienced with most
other aspects of Excel. Is there a way to make this happen (easily for
a noob)?

Thanks
 
sub saveit()

ActiveWorkbook.SaveAs FileName:=ThisWorkbook.Path & "\" & Range("A2").Value

End Sub

Assuming there are no illegal characters in the cell value.


Gord Dibben MS Excel MVP
 
Back
Top