Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Problems with a Combo Box

Hi,

I have set up a number of combo boxes and am running some _change macros
from them (see code below)

Private Sub Q2_Combo_Change()
Application.EnableEvents = False
If Sheets("Answers").Range("C2") = "Yes" Then MsgBox "Watch list"
Application.EnableEvents = True
End Sub

The combo box data is based on a variable range using an offset function:

=OFFSET(Lookups!$B$2,0,0,COUNTA(Lookups!$B:$B)-1,1)

This is to cover people changing the list in the future and the combo box
needing to auto update the list. For some values in this list, they are on a
watch list. Cell "C2" monitors for combo box output equal to an item on the
watch list. Problem is that when the target cell in "C2" equals "Yes" (based
on the combo box selection) the msg box appears twice.

Any ideas how to make it only appear once?

Rich

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Problems with a Combo Box

What is the formula in C2?

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Rich" wrote in message
...
Hi,

I have set up a number of combo boxes and am running some _change macros
from them (see code below)

Private Sub Q2_Combo_Change()
Application.EnableEvents = False
If Sheets("Answers").Range("C2") = "Yes" Then MsgBox "Watch list"
Application.EnableEvents = True
End Sub

The combo box data is based on a variable range using an offset function:

=OFFSET(Lookups!$B$2,0,0,COUNTA(Lookups!$B:$B)-1,1)

This is to cover people changing the list in the future and the combo box
needing to auto update the list. For some values in this list, they are
on a
watch list. Cell "C2" monitors for combo box output equal to an item on
the
watch list. Problem is that when the target cell in "C2" equals "Yes"
(based
on the combo box selection) the msg box appears twice.

Any ideas how to make it only appear once?

Rich



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Problems with a Combo Box

Cell C2 contains a lookup formula which essentially equates to "Yes" or "No"
based on the value of another drop-down box.

"Bob Phillips" wrote:

What is the formula in C2?

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Rich" wrote in message
...
Hi,

I have set up a number of combo boxes and am running some _change macros
from them (see code below)

Private Sub Q2_Combo_Change()
Application.EnableEvents = False
If Sheets("Answers").Range("C2") = "Yes" Then MsgBox "Watch list"
Application.EnableEvents = True
End Sub

The combo box data is based on a variable range using an offset function:

=OFFSET(Lookups!$B$2,0,0,COUNTA(Lookups!$B:$B)-1,1)

This is to cover people changing the list in the future and the combo box
needing to auto update the list. For some values in this list, they are
on a
watch list. Cell "C2" monitors for combo box output equal to an item on
the
watch list. Problem is that when the target cell in "C2" equals "Yes"
(based
on the combo box selection) the msg box appears twice.

Any ideas how to make it only appear once?

Rich




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
Combo problems Geoff Excel Discussion (Misc queries) 1 August 11th 08 11:50 AM
Combo box macro problems [email protected] Excel Programming 8 October 15th 06 06:45 PM
Problems with Combo Box aalam Excel Programming 2 November 10th 05 12:37 AM
Combo Box Problems Brad Excel Programming 0 April 12th 05 05:17 PM
Problems with combo boxes Jody[_4_] Excel Programming 1 December 31st 03 09:42 PM


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