WorkbookNew_ANmar

Creates new workbook (does not save it) and returns filename.

Function WorkbookNew_ANmar()
' creates a new workbook and returns its name
secScreen = Application.ScreenUpdating
Application.ScreenUpdating = False
Workbooks.Add
WorkbookNew_ANmar = ActiveWorkbook.Name
Application.ScreenUpdating = secScreen
ThisWorkbook.Activate
End Function

wknam = WorkbookNew_ANmar(&#34;Data&#34;)<br/>wknam = WorkbookNew_ANmar(&#34;New.csv&#34;, , 1)<br/>If WorkbookNew_ANmar(&#34;expenses.csv&#34;, 0) = &#34;&#34; Then msgbox &#34;Please close file before continue&#34;

Views 297 Downloads 127

'FindFile', 'GetExtension', 'workbook', 'workbooks', 'extension', 'instance', 'new', 'create', 'WorkbookOpen_ANmar', 'WorkbookClose_ANmar', 'WorkbookOpenAsk_ANmar', 'save', 'close'

ANmarAmdeen
324
Components VBA-Excel
Revisions

v2.0