Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Cancel button

When using a custom dialog box why doesn't the cancel button work. I mean yes it takes you out of the dialog box but any values you entered while in it (such as selecting a value from a combo box) are still applied if you hit "Cancel" or "Ok". Is there a way to make the changes not apply if you hit "Cancel"?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Cancel button

What are you telling the Cancel button to do? If you don't have any code in
the event handler then all it will do is close the dialog.

Wayne.


"IamHaxer" wrote in message
...
When using a custom dialog box why doesn't the cancel button work. I mean

yes it takes you out of the dialog box but any values you entered while in
it (such as selecting a value from a combo box) are still applied if you hit
"Cancel" or "Ok". Is there a way to make the changes not apply if you hit
"Cancel"?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Cancel button

Sorry, I'm just starting with all of this. I assumed that the cancel button was pre set to actually cancel anything entered. Any ideas on what code I should put in to make it work as an actual cancel button?

"David Battams" wrote:

What are you telling the Cancel button to do? If you don't have any code in
the event handler then all it will do is close the dialog.

Wayne.


"IamHaxer" wrote in message
...
When using a custom dialog box why doesn't the cancel button work. I mean

yes it takes you out of the dialog box but any values you entered while in
it (such as selecting a value from a combo box) are still applied if you hit
"Cancel" or "Ok". Is there a way to make the changes not apply if you hit
"Cancel"?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Cancel button

The answer to your question really depends a lot on what it is you are doing
exactly. If I can give you any general advice in the absence of knowledge
about what you are doing then it would be that you could take one of the
following approaches.

1. Don't actually make any changes to data until the user clicks OK.
Clicking Cancel, therefore, simply avoids committing any changes.
2. Reverse any changes made before the user clicked cancel, when they click
cancel.

I'd say that 1 is your best bet, especially if you are just getting started.

Regards,
Wayne.



"IamHaxer" wrote in message
...
Sorry, I'm just starting with all of this. I assumed that the cancel

button was pre set to actually cancel anything entered. Any ideas on what
code I should put in to make it work as an actual cancel button?

"David Battams" wrote:

What are you telling the Cancel button to do? If you don't have any code

in
the event handler then all it will do is close the dialog.

Wayne.


"IamHaxer" wrote in message
...
When using a custom dialog box why doesn't the cancel button work. I

mean
yes it takes you out of the dialog box but any values you entered while

in
it (such as selecting a value from a combo box) are still applied if you

hit
"Cancel" or "Ok". Is there a way to make the changes not apply if you

hit
"Cancel"?






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
message box without ok or cancel button Subash Excel Discussion (Misc queries) 1 October 18th 05 10:38 AM
Inputbox and cancel button Uddinj1 Excel Programming 5 March 2nd 04 11:27 AM
Cancel Button Matt Excel Programming 3 February 3rd 04 11:23 PM
Input Box Cancel Button rickylee Excel Programming 2 January 6th 04 11:43 PM
input box cancel button Ian Mangelsdorf Excel Programming 1 August 28th 03 09:05 PM


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