View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
wolf wolf is offline
external usenet poster
 
Posts: 24
Default Actions on certain Worksheets

Hi Grant

something like

Sub test()
Dim wksSheet As Worksheet
Dim i As Double
i = 1
For Each wksSheet In ThisWorkbook.Worksheets
If wksSheet.Name = "Server " & i & " Server Details" Then
'do your macro
i = i + 1
End If
Next
End Sub

Best regards

Wolf
WLamik<atgmx.net
-----Original Message-----
Hi

I have workbook which I use to monitor several data

servers. This workbook
has a large number of disparately named worksheets.

However, I need to run a
routine ONLY on worksheets with a particular naming

convention. The naming
convention is as follows; "Server 1 Server

Details", "Server 2 Server
Details" continuing incrementaly.

The routine I wish to run is;

Sub LinkDetail()
Range("Y7").Formula = "=$A$6"
Range("Y8").Formula = "=$B$6"
Range("Y9").Formula = "=$Q$6"
Range("Y10").Formula = "=$C$6"
Range("Y11").Formula = "=$D$6"
Range("Y13").Formula = "=$E$6"
Range("U16").Formula = "=CONCATENATE(""Shows CPU /

IO / idle time
utilization (in ticks) since ASE was last started.

["",$J$6, "" microseconds
per tick]"")"
Range("W18").Formula = "=$G$6"
Range("AA18").Formula = "=$H$6"
Range("AE18").Formula = "=$I$6"
Range("U23").Formula = "=$K$6"
Range("Y23").Formula = "=$L$6"
Range("AC23").Formula = "=$M$6"
Range("U27").Formula = "=$N$6"
Range("Y27").Formula = "=$O$6"
Range("AC27").Formula = "=$P$6"
Range("AI9").Formula = "=$R$6"
Range("AJ9").Formula = "=$S$6"
End Sub

Can anyone out there help.

Regards - Grant


.