ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Form wont hide (https://www.excelbanter.com/excel-programming/300367-re-form-wont-hide.html)

Tom Ogilvy

Form wont hide
 
It looks like you are not ever allowing your events to terminate - probably
why you are having memory problems as well.

--
Regards,
Tom Ogilvy



"Chad" wrote in message
...
I'm having trouble with my form not hiding. I think it has something to

do with screenupdating turned off, but that command comes after the hide
command. Here's my code:

I run this macro which calls up the form:

Sub Face_Sheet()
UserForm2.Show
End Sub

The form has a button which runs the report and this is the macro:

Sub main(printall As Variant, officeloc As Variant)

Dim Rng1, Rng2, col, i As Integer
Dim LRow, RowSkills, RowAvail As Integer

UserForm2.Hide
Unload UserForm2

If printall = 1 Then Sheets(officeloc).Select: Columns("a:ee").Delete

Application.ScreenUpdating = False
...code continues

The problem is that the form remains on the screen and doesn't disapear.

How can I make it go away?

Thanks




chad

Form wont hide
 
Okay, how do I terminate my subs?


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com