Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 2 questions related to Excel under Windows 98/2000

Hi,

I have 2 questions relative to Excel under Windows 98/2000 to submit to your attention :

1) How can I DEACTIVATE and REACTIVATE (from within a Visualbasic application)
the buttons marked [X] and labeled "Close the window" (in each Excel-document-window) and "Close"
(in the Excel-window itself) ?
Note: the button is located at the right upper corner of the window

2) How can I access (in an Excel-document) the key [Start Prompt...] under menu path
[Edition] -- [Links] -- [Start Prompt...] when the key [Links] is not activable (greyed) ?

Thanks for repying me at :




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default 2 questions related to Excel under Windows 98/2000

You can remove the X button BUT it is bad practice to change a standard interface. If you need to know use the Workbook_BeforeClose event to trap the event when a user clicks the X.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 2 questions related to Excel under Windows 98/2000

Hi

Thanks for your reply to my pos

I understand your suggestion NOT TO CHANGE standard interface and
I've now found a way to handle my application without disabling the X button-click

However, I've try to implement your Workbook_BeforeClose event just to see how it works

1) I've first declared a class module named AppCloseEventClass and containing the following code

Public WithEvents App As Applicatio

I could then add the following event handling procedure to the declared class module

Private Sub App_WorkbookBeforeClose (ByVal Wb As Workbook, Cancel As Boolean
a = MsgBox("Do you really want to close ?", vbYesNo
if a = vbNo Then Cancel = Tru
End Su

2) To make that event handling procedure runnable, it was necessary to initialize (in an other module
the class module as follow

Dim X As New AppCloseEventClas
Private Sub InitApp(
Set X.App = Applicatio
End Su

3) After one single run of InitApp(), I was able to trap each (but too much than desired) events WorkbookBeforeClos

4) I then added the following code at the bigin of my event handling procedure to trace the events

MsgBox Wb.Nam

and discovered that A LOT OF Workbooks send the event and NOT ONLY the one on which the X-button was clicked

Is someone aware about that behaviour and has any suggestion to better handle the WorkbookBeforeClose event
Thanks
Gaston






2)
----- AA2e72E wrote: ----

You can remove the X button BUT it is bad practice to change a standard interface. If you need to know use the Workbook_BeforeClose event to trap the event when a user clicks the X.
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
Excel 2000 questions Heather C[_2_] Excel Discussion (Misc queries) 1 April 25th 08 02:57 PM
Need help with Excel 2000 text-related functions Joan A Excel Worksheet Functions 7 February 3rd 08 10:36 PM
2 questions! Related to combobox and time function. HELP!! Bruno Excel Discussion (Misc queries) 11 September 28th 07 02:33 PM
Page breaks are different in Windows 2000 and Windows XP Bill Allen Excel Discussion (Misc queries) 1 November 23rd 05 04:42 PM
Excel Programs developed in Office 2000 on Windows 2000 Trooper Excel Discussion (Misc queries) 4 March 12th 05 11:09 PM


All times are GMT +1. The time now is 06:55 AM.

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

About Us

"It's about Microsoft Excel"