Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default CLOSE WORKBOOK FROM MENU WITH USERFORM

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
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?

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
close UserForm [email protected] Excel Programming 3 November 9th 06 02:33 AM
Userform close button Les Stout[_2_] Excel Programming 2 November 3rd 05 06:44 PM
Close a userform Alvin Hansen[_2_] Excel Programming 1 September 26th 04 12:56 PM
Resetting menu option on close... Tom Ogilvy Excel Programming 0 July 27th 04 07:04 PM
Close button on Custom Menu Bars Aaron[_6_] Excel Programming 2 July 18th 03 03:58 AM


All times are GMT +1. The time now is 07:45 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"