obrian_brian
New Member
- Joined
- Jul 23, 2018
- Messages
- 2
Dear All,
Im trying to learn macros by running the syntax below but its giving me User-defined type not defined error. Where can I be wrong?
Sub MonthlyWorksheets()
'
' MonthlyWorksheets Macro
' This macro renames work sheets
'
'
Dim i As interger
i = 1
Do While i <= 4
Sheets.Add After:=ActiveSheet
ActiveSheet.Name = "Week " & i
i = i + 1
Loop
Worksheets(1).Delete
End Sub
Im trying to learn macros by running the syntax below but its giving me User-defined type not defined error. Where can I be wrong?
Sub MonthlyWorksheets()
'
' MonthlyWorksheets Macro
' This macro renames work sheets
'
'
Dim i As interger
i = 1
Do While i <= 4
Sheets.Add After:=ActiveSheet
ActiveSheet.Name = "Week " & i
i = i + 1
Loop
Worksheets(1).Delete
End Sub