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

Thanks for reading my question,

I have a combo box that, upon changing the value, I wish
to ask the user if they are sure they want to make the
change as there are consequences.

How can I do this? I have tried if statements on the
_Change event of the combo box, but can't get that to
work, and can't get the combo box to look at the
BeforeUpdate () line (as is seen below).

I have also tried the solution posted by Todd on May 7,
and couldn't get it to work.

Thanks in advance,

Brad

Private Sub ComboBox2_BeforeUpdate(ByVal Cancel As
MSForms.ReturnBoolean)
Dim Answer As Variant

Answer = MsgBox("Changing this value will delete the
current list of feeds, and numbers of birds per feed
stage. This will affect the Feed Stage Combo boxes on
this sheet. Do you wish to continue?", 36)
If Answer = vbNo Then
Cancel = True
Else
GetProductNames
End If
End Sub
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
Workbook_BeforeClose(Cancel As Boolean) - Cancel won't work gpmichal Setting up and Configuration of Excel 1 May 12th 09 02:33 AM
cancel save lawson Excel Discussion (Misc queries) 1 October 11th 07 11:00 PM
Input Box - CANCEL Danny Excel Worksheet Functions 6 December 1st 06 02:15 AM
How can I expose the TextBox BeforeUpdate event to my user class? bereid Excel Discussion (Misc queries) 0 November 30th 05 05:00 PM
BeforeUpdate event for Combo box Brad Excel Programming 2 May 7th 04 06:22 PM


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