View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Auto "Save As" Cell value when data entered in cell

You would use the change event and put in an if statement. Assume D1 is the
"contact cell".

Private Sub Worksheet_Change(ByVal Target As Range)
if Target.Address = "$D$1" then
if Thisworkbook.Path = "" then
ThisWorkbook.SaveAs "C:\Myfolder\" & Target.Value & ".xls"
end if
End if
End Sub

right click on the sheet tab of the sheet with the "Contact Cell" and select
view code, then put in code like the above.

http://www.cpearson.com/excel/events.htm for an overview of events.

To learn about vBA
http://msdn.microsoft.com/office/und...d/default.aspx
http://www.mvps.org/dmcritchie/excel/getstarted.htm
http://www.mvps.org/dmcritchie/excel....htm#tutorials

--
Regards,
Tom Ogilvy


"Ron" wrote:

I am developing a form template for our company. I would like it to
automatically prompt to "Save As" as soon as data in entered into the contact
cell. I would also like it to suggest for the file name, the name that is in
that cell.

I would assume this would be performed in the Visual Basic Editor but I am
not sure. Also, I am not familiar with this programming format.

Thank your for your assistance