1

Topic: Alternative command (ActiveSheet)

There is a user function (Udf), it is allocated on all sheets of the book. How to address to sheet in which there is a function? I use

ThisWorkbook. ActiveSheet

, but results permanently change,

ThisWorksheet

- such command unfortunately is not present.

Function äëÿñèò (Diapozon As Range) As Long
' äëÿ ñèòóàöèè
Application. Volatile
Dim n As Long
Dim C As Range
Dim m As Long
m =-1
n = 0
For Each C In Diapozon. Rows
If C.Value = 1 Then
m = m + 1
If ThisWorkbook. ActiveSheet. Cells (101, 42 + (m * 21)).Value = 1 Then
n = n + 1
End If
End If
Next A C
äëÿñèò = n
End Function

2

Re: Alternative command (ActiveSheet)

http://www.planetaexcel.ru/forum/index. … sage821462

3

Re: Alternative command (ActiveSheet)

maxim863 wrote:

How to address to sheet in which there is a function?

Me !

4

Re: Alternative command (ActiveSheet)

The Kazan;
Thanks!