Macro to save as using two cell values inside worksheet

  • Thread starter Thread starter sdblack
  • Start date Start date
S

sdblack

I want to create a macro to rename a file at the first save using th
value of two cells inside the workbook
 
With ThisWorkbook.Worksheets(1)
ThisWorkbook.SaveAs filename:= _
"C:\MyFolder\" & .Range("A1").value & "_" & _
.Range("B9").Vaue & ".xls"
End With

You said the first save - but it would be hard to suggest much more without
knowing more about the workbook - is it being created from a template, when
the values in the two cells would be created and so forth.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top