PC Review


Reply
Thread Tools Rate Thread

CLOSE WORKBOOK FROM MENU WITH USERFORM

 
 
=?Utf-8?B?U0VBTiBESScnJydBTk5P?=
Guest
Posts: n/a
 
      19th Oct 2007
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?

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SlJGb3Jt?=
Guest
Posts: n/a
 
      19th Oct 2007
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?
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform in Before close event of workbook Raj Microsoft Excel Programming 4 30th Jun 2008 11:29 PM
Close a Excel Workbook when close a userform in Outlook lars.oyangen@hamstad.no Microsoft Outlook VBA Programming 2 8th May 2008 02:54 PM
How to close a userform in a forusers, close protected form? De Wilde Eddy Microsoft Excel New Users 1 7th Jun 2004 06:58 PM
How to close a userform close protected De Wilde Eddy Microsoft Excel Discussion 1 7th Jun 2004 06:41 PM
Excel 2000 Workbook close button hides instead of close Steven Robinson Microsoft Excel Misc 3 13th Aug 2003 11:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:37 PM.