Below Example Shows how we can create a new Worksheet using Macro.
VBA Macro Code / Syntax : -
VBA Macro Code / Syntax : -
mySheet = "Sagar"
On Error Resume Next
Temp = Worksheets(mySheet).Name
If Err.Number = 0 Then
MsgBox "The sheet already Exists "
Else
Err.Clear
Worksheets.Add.Name = mySheet
MsgBox "The New sheet Created "
MsgBox "The New sheet Created "
End if
This is how we can create a new worksheet Using a VBA macro in Excel 2010/2003/2007.
No comments:
Post a Comment