I need to use Macro's in Excel and always the same changes to 31 Sheets. (31 days in the Month).
I'm trying to use a FOR loop but cannot get the correct format to have the sheet number to increment by 1 in each loop.
Below is a silly little Macro but indicates what my problem is.
I have tried inserting my variable intSheet in various ways including concatenation to no avail.
Any help would be greatly appreciated.
Thankyou
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 02 09 2006
'
Dim intCounter As Integer
Dim intSheet As Integer
For intCounter = 1 To 31
Range("C5").Sel ect
ActiveCell.Form ulaR1C1 = "hello"
Range("C6").Sel ect
Sheets("Sheet1" ).Select 'I need this sheet to increment by 1 each loop
Range("C6").Sel ect ' I tried various ways of using intSheet to replace "Sheet1"
intSheet = intSheet + 1
Next
End Sub
I'm trying to use a FOR loop but cannot get the correct format to have the sheet number to increment by 1 in each loop.
Below is a silly little Macro but indicates what my problem is.
I have tried inserting my variable intSheet in various ways including concatenation to no avail.
Any help would be greatly appreciated.
Thankyou
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 02 09 2006
'
Dim intCounter As Integer
Dim intSheet As Integer
For intCounter = 1 To 31
Range("C5").Sel ect
ActiveCell.Form ulaR1C1 = "hello"
Range("C6").Sel ect
Sheets("Sheet1" ).Select 'I need this sheet to increment by 1 each loop
Range("C6").Sel ect ' I tried various ways of using intSheet to replace "Sheet1"
intSheet = intSheet + 1
Next
End Sub
Comment