View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
OJ[_2_] OJ[_2_] is offline
external usenet poster
 
Posts: 111
Default WHy does it only work on Menu SHeet

Hi,
I'm not entirely sure what you are trying to achieve here so perhaps a
better explanation will result in a better response but this should get
you started...

This code will loop thru all worksheets not called Menu and perform the
same operation on each sheet. In your example you don't tell us
what/where value1, value2 etc come from...

Dim objWs As Worksheet, intInc As Integer

For Each objWs In ThisWorkbook.Worksheets
With objWs
If Not .Name = "Menu" Then
.Cells(2, 2).End(xlToRight)(1, 2).Value = Value1
.Cells(3, 2).End(xlToRight)(1, 2).Value = Value2
.Cells(4, 2).End(xlToRight)(1, 2).Value = Value3
Call EssMenuRetrieve
End If
End With
Next objWs


hth,
OJ