View Single Post
 
Old 07-06-2014, 11:14 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit 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