I am new with MS EXCEL VBA but I still read some blog about VBA and how it works. I got idea on renaming excel sheet, disabling rows and adding new sheets. But I want to know
how to automatically insert row every day, add new sheet every month, and create new same(default structure) workbook every year add in MS EXCEL 2013 ? How do I do that?
Date today is 1 then tomorrow excel automatically add 1 row for date. If month of January ends then excel automatically add new sheet for February. And it year changes excel generate same default or empty workbook with the current year.
The default structure of the excel, the excel file are located at https://github.com/Ailyn09/project102/blob/master/2017.xlsx
CURRENT CODE
Sub Sample()
'Disable adding row
Dim I As Integer
Dim cbStr As String
Dim cbCtrl As CommandBarControl
Application.ScreenUpdating = False
For I = 1 To 2
If I = 1 Then
cbStr = "row"
Else
cbStr = "column"
End If
For Each cbCtrl In Application.CommandBars(cbStr).Controls
If cbCtrl.ID = 3183 Then
cbCtrl.Enabled = False
End If
Next
Next
Application.ScreenUpdating = True
'Copy Existing Sheet And Month As Name
ActiveSheet.Copy , Sheets(Sheets.Count)
ActiveSheet.Name = Month()
End Sub
GOT AN IDEA FOR SHEET EVERY MONTH HERE: https://excel.tips.net/T002017_Sheets_for_Months.html