Seeing if a form has loaded
Posted on 2003-03-06
I'm using VBA in excel and i've got a little problem. I have an if statement, that is lengthy unfortunately. I only want something to happen if 4 different things come out true. so this is the way i have it right now:
If ActiveCell.Column > 9 And ActiveCell.Column < 14 And ActiveCell.Row <> 1 And pinorspec.Visible = False and splineinput.visible = false Then
the thing i don't like is that checking the visible property of those forms is taking a little time. it's actually not that long, but the hourglass appears for just a split second and dissappears. it basically pauses for just a second. i know it's the form stuff giving me problems b/c checking those cell properties takes no time from the testing i've done. so, here's the question. is there a way to check whether or not a form is loaded or not?
also, if you can find a way to trim down that if statement it would be appreciated. this all happens in the sub Worksheet_SelectionChange area. i'm basically just waiting for a selection to be made to a certain area of the worksheet and when it happens, pop up the forms, unless they are already loaded.
Also, is there a way to pass values between those forms in excel VBA? i've tried the whole "Public Dim xyz as Integer" etc, and they don't get passed between the forms for some reason. sorry for the lengthy question, jsut trying to cover all my bases, thx guys.