Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
2. The close method for the Workbooks object takes no arguments
You could do for each bk in workbooks if bk.name < thisworkbook.name then bk.close SaveChanges:=False end if Next Application.Quit 1. As for reshowing the userform, it is unclear what you mean by closing the document. I the user closes the workbook that contains the form, then you would have to reopen the workbook and issue the command to display the form. -- Regards, Tom Ogilvy "Clarissa" wrote: Hi Everyone, Thanks in advance for any help! I have two issues, 1. I'm using a userform where the user will "view" a report in excel. When the document is opened, the userform unloads. The user views the document and then closes it. How can I then have the userform back on the screen again? 2. Also, I have an Exit button which will exit the macro/workbook - exiting the macro and closing the file. The error I get is: compile error - wrong number of arguments or invalid property. Here's that code: Private Sub CommandButton3_Click() Workbooks.Close savechanges:=False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Userform to grab,correct and restore data | Excel Programming | |||
restore | Excel Discussion (Misc queries) | |||
restore down | Excel Discussion (Misc queries) | |||
Had to restore .. and now.. | Excel Discussion (Misc queries) | |||
Restore Gridlines | Excel Discussion (Misc queries) |