Excel vba save current sheet as

VBA has a CurDir keyword that will return the "current directory" as stored in Excel. I'm not sure all the things that affect the current directory, but definitely opening or saving a workbook will change it. This assumes that the sheet you want to save has never been saved and you want to define the file name in code. Mar 13, 2019 · The Save As dialog box opens, with the current folder selected, or the default save folder. The folder is filtered, to show only the PDF files that it contains. At the top of the Save As window, the customized title is shown, "Select Folder and FileName to save" Excel Macros (VBA) tips for beginners. I do not use macros that have too many lines of codes as this may confuse beginers. I remembered when I started learning macro programming and going to sites by Chip Pearson & John Walkenbach and started seeing stars instead of VB!!!. The VBA Save As command saves an Excel file as a new file, similar to clicking the Save As icon or using the Save As Shortcut (Alt > F > A). Above, we identified all the ways to specify which workbook to save. You can use those exact same methods to identify workbooks when using Save As. Save As ... VBA is the window into Excel's soul - unveiling the Wizard behind the curtain. Okay, it's actually some simple code that allows you to Automate almost anything in Excel.