Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop - for each sheet not working?
I want a value to be written to same cell of all the sheets. I have
following macro written. =========== Sub All_Sheets_Loop() Dim i As Integer Dim sh As Worksheet For Each sh In ThisWorkbook.Worksheets ActiveSheet.Range("A1").Value = 10 Next End Sub =========== Above macro writes only in the active sheet and other sheets are not written by the value. If I add a line activate.sheet it gives error. Any thoughts pl? Shetty |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop all Sheets not working. | New Users to Excel | |||
On Error GoTo Label in a loop only working once. | Charts and Charting in Excel | |||
Another loop & sheet question | Excel Programming | |||
Using UsedRange as limits in a For Each loop but for cells on another sheet ? | Excel Programming | |||
Excluding sheet in loop | Excel Programming |