WorkbookNew_ANmar

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

CodeFunctionName
What is this?

Public

Tested

Original Work
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("Data")
wknam = WorkbookNew_ANmar("New.csv", , 1)
If WorkbookNew_ANmar("expenses.csv", 0) = "" Then msgbox "Please close file before continue"

Views 3,277

Downloads 1,315

CodeID
DB ID