code failing in hidden rows
Dave,
Yes, this is a hugely complicated workbook with Worksheet_Change and
Worksheet_SelectionChange on that sheet.
I could post all of the sheet's code here, and also the full code from the
UserForm which includes the code in question, but there are also numerous
Modules to which the sheet code refers, and providing all that to really nut
out what could cause the problem may be rather tedious.
I suspect I'm just having a glitch with this and that there isn't actually
an error in the code at all. As you have confirmed, the code works fine.
I must point out, and maybe this may have a cause, is that I'm running this
file in [Compatibility Mode] so that others not having 2007 can have acces
to it. I have tried to save as an XLSM file to test if the problem still
occurs when running as 2007 version, but even though it saves OK, I can't
run any macros, even though they are there! It says they are disabled.
However, checking the Macro security, I find it is set to "Enable all
macros".
I'm out of ideas, except that I think I'll just transfer the Range to an
area that can remain unhidden.
If you have any help regarding the macro disabled problem, that would also
be appreciated.
Rob
"Dave Peterson" wrote in message
...
I opened xl2007 (not visual studio!) and tested your code.
It worked fine.
Could you have some sort of event macro running, too?
ps. I hid the rows manually.
RobN wrote:
Dave,
I'm using the dreaded 2007 version, which is giving me grief in other
areas
as well...GRRRrrrr!! I'm certainly not recommending anyone use this
version
at all.
Rob
"Dave Peterson" wrote in message
...
I couldn't duplicate the problem in xl2003.
What version of excel are you using? Maybe someone with that version
could try
to duplicate it.
RobN wrote:
I have the following code as part of other code which is executed via
a
UserForm.
With Sheet4
.Range("V13:V20").Value = .Range("R5:R12").Value
End With
When I unhide those rows the code works fine.
Part of the range, namely rows 16 to 23 are hidden. When I execute
this
code, those cells located within the hidden range do not reflect the
values
from the R5:R12 range. No error message appears, yet only values are
copied
into the unhidden cells.
Other parts of the code within this procedure do copy the value to the
cells
in the hidden range, eg....
If Range("U9") = True Then Range("V17") = CloseBal
Can anyone see a problem here?
Rob
--
Dave Peterson
--
Dave Peterson
|