MS Excel close form command

  ThePharcyde007 09:00 31 Mar 2004

I have a xls which opens a form when the xls is opened. From the opening form, I have two sub forms which open when a button is clicked. Question being is when I open one of the subforms, the first one hides in the background. Is their a command to close the redundant form?

thank you

  VoG II 09:34 31 Mar 2004

Unload Userform1

Obviously substitute the name of the form for Userform1

  ThePharcyde007 10:22 31 Mar 2004

Thank you Vog

Unload Main Menu
DialogSheets("Fund Reporting").Show

Its is a dialog I am trying to hide. the sheet is called Main Menu.

It does not seem to be working

Thank you

  VoG II 10:45 31 Mar 2004

DialogSheets("Fund Reporting").Hide

However, the dialog box will not be truly closed until the procedure that called it up ends. This prevents output being sent to a printer. The best method is to use a button whose properties are set to dismiss the dialog (set button's property to Dismiss).

However, Dialogs are so old hat I would have thought that you would be better off using Userforms.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

iMac Pro review

See iconic duo Smith and Foulkes' epic animation for the BBC's Winter Olympics coverage

iMac Pro review

Idées cadeaux pour geeks et tech addicts