Hi
Use the following Sub
Sub SaveWithNameInA1()
Application.DisplayAlerts = False
ThisWorkbook.SaveAs "C:\Census\" & Sheet1.Cells(1, 1).Value & ".xls"
Application.DisplayAlerts = True
End Sub
and attach it to the button.
"yasser" wrote:
> Hello,
>
> I want to create a button in an Excel Spreadsheet that will allow user users
> to save the existing workbook in a specific directory (ie. C:\Census\"Value
> from Cell A1".xls). Additionally, I would also like to have the file name to
> be the sameas the text in cell A1 (CurrentFile) and when the button is
> clicked, the user should not see the "SAVE AS" dialogue box or the dialogue
> that says, "Do you want to replace the existing file?" dialogue.
> Can someone please give me the VBA code that I need in order to execute the
> above mentioned event?
>
> Thanks,
>
> Yasser
|