Creates a new file with user macros.

Syntax:

CreateUserMacros( FileName As String, Name As String ) As Boolean
Return: Boolean
Parameters: FileName File name of the new user macros file. An error occurs if the file with the given name already exists.
Name Name of the user macros file shown in the VBA Editor.

Example:
Dim Tool As VBATool
Dim Filename As String

Set Tool = Application.Tools.VBATool
Filename = Application.Tools.DirectoryTool.GetDefaultMacroPath & "NewMacros.macro"
Call Tool.CreateUserMacros(Filename, "NewMacros")

See also:

Class VBATool


Last Updated: 04/27/05