Hi Folks..
Having a brain dead day..
I have the following macro that changes the contents of a cell to a given text
Sub months()
Dim wks As Worksheet
Dim str As String
str = InputBox("Enter Month")
For Each wks In Worksheets(Array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21"))
wks.Range("O4") = str
Next wks
End Sub
I have had to add in another worksheet to the Spreadsheet called 'CG48X' and would like to put the str value into the cell R4.
Obviously I'd have to put it outside the loop after the 'Next wks' but I can't work out the syntax.
Can anone help?
Regards
Declan
Having a brain dead day..
I have the following macro that changes the contents of a cell to a given text
Sub months()
Dim wks As Worksheet
Dim str As String
str = InputBox("Enter Month")
For Each wks In Worksheets(Array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21"))
wks.Range("O4") = str
Next wks
End Sub
I have had to add in another worksheet to the Spreadsheet called 'CG48X' and would like to put the str value into the cell R4.
Obviously I'd have to put it outside the loop after the 'Next wks' but I can't work out the syntax.
Can anone help?
Regards
Declan