> When I run the sub below it works fine. However when I call it from
> Document_Open() it gets ugly.
[quoted text clipped - 14 lines]
> Next
> End Sub
On May 14, 10:02 am, Jean-Guy Marcil
<JeanGuyMar...@discussions.microsoft.com> wrote:
> "Liaka...@gmail.com" wrote:
> > When I run the sub below it works fine. However when I call it from
[quoted text clipped - 29 lines]
>
> - Show quoted text -
Thank you for your quick response and apologize for not being more
clear.
Like you, I tried the above sub on a test document and it worked
perfectly. I apologize for not being more clear.
I am using Word 2003. The VBA has about 200 lines of code. When I call
the sub HideRows from sub Document_Open I observe the behavior below:
Observed behavior: When call HideRows from Sub Document_Open() and ,
the application removes 5 of the rows and only text from the other 8.
Rows with Labels and Radio buttons are not removed.
Rows without Labels and Radio buttons are removed.
when I run sub HideRows alone it works perfectly.
Expectations: I would the called sub HideRows to work as it does when
running it alone.
Thanks again.
Jean-Guy Marcil - 14 May 2008 21:06 GMT
> Thank you for your quick response and apologize for not being more
> clear.
[quoted text clipped - 10 lines]
> Rows with Labels and Radio buttons are not removed.
> Rows without Labels and Radio buttons are removed.
By Radio Buttons and Labels, you mean ActiveX controls from the Control
Toolbar, right?
In my tests, also with Word 2003, this is what I used, I placed a few of
them in the first 13 rows, all of them with an "in line with text" wrapping.
> when I run sub HideRows alone it works perfectly.
Same here.
> Expectations: I would the called sub HideRows to work as it does when
> running it alone.
On my machine, it works equally well, whther I call it from a Document_Open
sub or if I call it directly with ALT-F8 after opening the odcument.
My guess is that you have some other code in your 200 lines that interferes...