MS Excel close form command

  ThePharcyde007 09:00 31 Mar 04
Locked

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 04

Unload Userform1

Obviously substitute the name of the form for Userform1

  ThePharcyde007 10:22 31 Mar 04

Thank you Vog

Sheets("sheet1").Select
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 04

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.

Best phone camera 2016/2017: Galaxy S7 vs iPhone 7 vs Google Pixel vs HTC 10 Evo vs OnePlus 3T vs…

1995-2015: How technology has changed the world in 20 years

The Pantone Colour of the Year 2017 is Green

Super Mario Run preview | Hands-on first impressions of Super Mario Run: Mario's iPhone & iPad…