how can I see if an array contain a certain variable?
Hi
but why do you want to check this?. If you only want to make sure that
it is not the same workbook why not compare the workbook objects?
--
Regards
Frank Kabel
Frankfurt, Germany
"Ronaldo" schrieb im Newsbeitrag
...
Hi,
At least do I belive I should use arrays to solve it, but did sleep
during
the array part of the course:-)
In an Worksheet_Deactivate event, I want to compare if the Target
range is
into one of my known sheets or if it is an unknown sheet. This will
make me
know if Target is another workbook, since there will be no more
sheets in my
workbook. I thought of running a loop through my array with 13
woorksheets
and see if the "ActiveWorksheet" is there.
I have started to give name the arrays like:
shtArray(0) = Sheet1.Name
shtArray(1) = Sheet2.Name
:
and thought of running a Loop like:
"If ActiveSheet.Name < shtArray" Then
I has been thinking about using woorkbook_deactivate event, but can't
find
out how i can get the Target range and continue with my code in a
right
way.
Better ways to solve it are of course welcome, but maybe this give me
a
reason to learn arrays once and for all:-)
- Regards -
|