Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default MsgBox in Enter event causes combobox not to run Change event

I posted this Friday but no takers so I will try again. I appreciate any
help anyone can give. I have tried everything and in every event.
---
I have a multipage (mpgLogs) on a form with three pages. I change which page
to display based on the value of a combobox. I want to make sure the user
wants to change the combobox value because I will delete control values on
other pages of the multipage. So I show a msgbox with vbYesNo.

If they click No, I want to keep the same combobox value and don't change
the multipage. If they click Yes, clear control values and change the
multipage to the page selected in the combobox.

When the user clicks yes and then clicks a new value in the combobox the
following events fi 1) down button click 2) mouse down, 3) mouse up. No
change event. The value of the combobox stays at the original value. Why
don't the change, click events fire?

I do not want to use the Before or AfterUpdate events because the user has
to move from the combobox before they fire. I want the check before.

Thanks again for any help you can give.

Private Sub cbLogType_Enter()
Dim stMsg, stTitle As String
Dim iResponse, iStyle As Integer

' Define message.
stMsg = "Are you sure you want to change the Log Type?" + vbCrLf
stMsg = stMsg + "Clicking Yes will delete all previous values." + vbCrLf
stMsg = stMsg + "Click Yes to change and No to keep the same Log Type?"
' Define buttons.
iStyle = vbYesNo + vbQuestion
' Define title.
stTitle = "Cancel Log Type Change?"

' Display message.
iResponse = MsgBox(stMsg, iStyle, stTitle)

If iResponse = vbNo Then
' User chose No so just change focus so that cbLogType does not change
mpgLogs.SetFocus
Else
' I don't think i need an else because i will change the multipage
when the
' Change event fires
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
MsgBox in ComboBox Enter Event does not allow update Richard Excel Programming 1 March 3rd 06 08:15 PM
Combobox on change event Matt Jensen Excel Programming 4 December 29th 04 04:37 PM
Spurious ComboBox change event Tony Adams Excel Programming 2 June 11th 04 02:35 PM
combobox change event scrabtree23[_2_] Excel Programming 3 October 20th 03 05:56 PM
Generic ComboBox change event steve Excel Programming 7 October 14th 03 07:30 PM


All times are GMT +1. The time now is 09:26 PM.

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"