Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2014, 11:14 PM
macropod's Avatar
macropod macropod is offline ComboBox1_NotInList Question Windows 7 32bit ComboBox1_NotInList Question Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


The basic problem is that you're misusing StrMsg. You define it as being a particular string, with no way to change it, then try to test whether it's something else! Try something based on:
Code:
Private Sub ComboBox1_NotInList(NewData As String, Response As Integer)
    Dim varMsg As Variant
    ' Prompt user to verify they wish to add new value.
    varMsg = MsgBox("'" & NewData & "' is not in the list. " & _
      "Would you like to add it?", vbOKCancel)
    If varMsg = vbOK Then
        MsgBox "OK"
    Else
        MsgBox "Cancel"
    End If
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
ComboBox1_NotInList Question Macro Needed to Insert Asnwer to A Question in Multiple Choice Format Question rsrasc Word VBA 7 03-28-2014 12:28 PM
ComboBox1_NotInList Question Question jmsa7 Excel 3 12-13-2011 01:44 AM
ComboBox1_NotInList Question One to many and many to one question Girlie4 Excel 3 08-09-2009 08:02 PM
Need help with this question... lllDNYlll Outlook 0 05-04-2006 07:17 AM
Categories question & replying with attachment question glitzymama Outlook 0 03-15-2006 09:32 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:28 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft