View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
George Furnell[_2_] George Furnell[_2_] is offline
external usenet poster
 
Posts: 18
Default How to indicate that the current visible worksheet is the active o

Good day,

I have a function in a module, in which I would like to state that the
current visible worksheet should be treated as the active one, because I do
not know during execution what the sheet name will be. In the example below
the sheet name is hardcoded, what is the better solution?

With ActiveWorkbook
With .Worksheets("Titans")
.Range("M5").Value = 5
End With
End With

Kind regards

George