#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forms.Close

I have a macro with a number of userforms, I want to be
able to close them all at once as sometimes multiple
copies of the same form lie under the topmost one. VBE
help says I can use

Sub CloseForm()
Forms("MyForm.frm").Close
End Sub

or

Sub CloseAll()
Forms.Close
End Sub

I tried using these in a Public Sub placed in a module and
called from a command button on each form. However, I get
this error message.

Sub, Function, or Property not defined (Error 35)

Any ideas why?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why excel close all files when I just want to close one files hon123456 Excel Discussion (Misc queries) 2 December 8th 10 12:12 PM
why do all excel worksheets/workbooks close when I close one? Penny Excel Discussion (Misc queries) 1 November 29th 06 03:49 AM
close button does not close goplayoutside Excel Discussion (Misc queries) 1 October 11th 05 03:42 PM
Excel shoud not close all active books when clicking close button technomike Excel Discussion (Misc queries) 0 June 10th 05 05:35 PM
excel - Windows close button (x) should only close active workboo. CoffeeAdict Setting up and Configuration of Excel 3 February 8th 05 04:30 AM


All times are GMT +1. The time now is 07:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"