Hi,
I am using this macro to insert a new sheet and name it as Main.
Sub InsertIndex()
On Error GoTo ErrHandler:
Dim SheetName As String
On Error Resume Next
SheetName = InputBox("Enter new name of Worksheet", "Sheet Info.", "Main")
Sheets.Add
ActiveSheet.Name = SheetName
ErrHandler:
Resume Next
End Sub
I need the code to be modified a bit. So that
1>if there exists a "Main" worksheet the code will not be executed (means no new sheet will be inserted" and will execute TRSS1009 function in the existing main sheet.
2>if the "Main" sheet does not exists the code will be executed and then call this function: TRSD1723 and then TRSS1099
Thanks in advance.
Bookmarks