View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JRForm JRForm is offline
external usenet poster
 
Posts: 130
Default CLOSE WORKBOOK FROM MENU WITH USERFORM

From a previouw post of Tom Ogilvy

On error Resume next
workbooks("Customer Metrics.xls").Close SaveChanges:=False
On Error goto 0




"SEAN DI''''ANNO" wrote:

This is proving to be so frustrating.. I have a workbook called menu, which
has a user form. On the form there are labels which each hyperlink to a
different report;

For example;
Application.ThisWorkbook.FollowHyperlink "S:\Lists\Analysis\CVC
METRICS\Customer Metrics.xls"
Windows("Report Menu.xls").Activate
ActiveWorkbook.Close False


On each report e.g. Customer Metrics, i have a command button for returning
back to the form. How do I close, the customer metrics program oce it has
returned to teh menu becuase the userform prevents anything closing. I did
try and close it before showing userform.show but I keep getting a
application error. What is the right method?