Data Validation with Combo box autocomplete

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi! I am using data validation with combobox autocomplete and it's working
fine. However, I noticed I am unable to cut and paste values from other cells
(cells which do not have data validation) I'd like to know if there's any way
I can have the cut and paste function back? Thanks!
 
You can add a bit of code to test for CutCopyMode, and exit the
procedure if it's true:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim str As String
Dim cboTemp As OLEObject
Dim ws As Worksheet
Set ws = ActiveSheet

Application.EnableEvents = False
Application.ScreenUpdating = False

If Application.CutCopyMode Then
GoTo errHandler
End If

Set cboTemp = ws.OLEObjects("TempCombo")
On Error Resume Next
With cboTemp
.Top = 10
.Left = 10
.Width = 0
.ListFillRange = ""
.LinkedCell = ""
.Visible = False
.Value = ""
End With

errHandler:
Application.ScreenUpdating = True
Application.EnableEvents = True
Exit Sub

End Sub
 
Hi Debra! Thanks for your reply. I tried the code below and it's not working.
I have a list of over a thousand entries of spare parts w/combobox
autocomplete working fine. However, after making the combobox work I am now
unable to cut/copy/ paste values from other cells (cells which do not have
combobox). Pls. help! thanks!
 
Back
Top