In my application that involves multiple workbooks, I am trying to arrange for a certain worksheet (Enrollment) of a certain workbook (CampWorkbook…although this is a variable of type WORKBOOK and has the actual workbook name assigned to it much earlier in the application ) to be visible behind a message box that I issue. I want this so that the user can respond in the message box based on what he/she sees behind the message box. The desired workbook/worksheet is opened and neither the workbook nor the worksheet are hidden, merely concealed by overlapping worksheets. My code to do this seems to work sometimes but not at other times. I run the application on two machines and it seems to always work on one of them (the development/test machine). It works intermittently on the other (the production machine!). I've not been able to isolate the cause of the failure. The germane segments of the code are below. One clue might be that putting a break point on the statement:
(which is ahead of the msgbox statement) and when the break is encounter, clicking F8 to step forward through this segment of code seems to make the desired positioning work. Obviously this is not an acceptable solution!Please Login or Register to view this content.
Can someone help me please? Perhaps there is a preferred/standard technique to force the visibility of a certain worksheet other than using “ACTIVATE” ? I've read a bit about the VISIBLE property, but despite its name, I haven't concluded that its what I need....am I wrong?
Below are segments of the code involved: (You'll see that I have deleted portions of the code that don't seem relevant to my issue.)
Please Login or Register to view this content.
Thanks.
Bookmarks