Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
R.Chapman
 
Posts: n/a
Default Urgent Help, Comboboxes and IF.


Quick question.

Say i have a combobox with 5 answers in, 1 2 3 4 and 5.

Is there anyway to get this information into and IF command.

I need Cell F11 to run the macro 'Correct' if the answer is 4 or run
the macro 'Incorrect' if it is 1 2 3 or 5.

Urgent reply needed, thanks alot.

Rob.


--
R.Chapman
------------------------------------------------------------------------
R.Chapman's Profile: http://www.excelforum.com/member.php...o&userid=31631
View this thread: http://www.excelforum.com/showthread...hreadid=513236

  #2   Report Post  
Posted to microsoft.public.excel.misc
vezerid
 
Posts: n/a
Default Urgent Help, Comboboxes and IF.

The following worksheet event macro should do:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$2" Then
If Range("D2") = 4 Then
Call Correct
Else
Call Incorrect
Endif
Endif
End Sub

We assume that the combo box is linked to cell D2 in this worksheet. To
include,
Right-Click on the sheet tab, select View Code and paste the code. Once
you are in this module you can go to the top of the code window and see
which other events can be handled with event procedures.

HTH
Kostis Vezerides

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
Newbie Lost with comboboxes and dropdowns in excel bwall Excel Discussion (Misc queries) 1 September 7th 05 01:18 AM
Need help with ComboBoxes. rosemary New Users to Excel 2 July 9th 05 12:19 AM
Clear Comboboxes & Textboxes MBlake New Users to Excel 3 May 2nd 05 10:29 PM


All times are GMT +1. The time now is 03:54 PM.

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"