简体   繁体   中英

Excel VBA Save As in current directory using cell text as filename

I can currently use a tickbox in excel to save as a workbook in the current directory with:

ActiveWorkbook.SaveAs "aaa.xslm"

Is there anyway to have the filename taken from a cells text content, so that on the workbook you type text into a cell and then when you click the checkbox it saves as contentsofcellA1.xslm so if bbb was written in cell A1 the filename would be bbb.xslm

Any help would be greatly appreciated.

ActiveWorkbook.SaveAs (Range("A1").Value & ".xslm")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM