Stretchwickster
Programmer
Hi people!
I wrote the following VBA code which checks the Range C4:R4 for the item selected in the ProjTitleComboBox. As I have written in the following comments - when I test this code, ProjTitleComboBox.Text contains "Administration" and so does cell "C4" therefore a match should be found but Find returns nothing!
Has anyone got any ideas as to what could be going wrong?
Your help would be much appreciated!
Clive![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
Ex nihilo, nihil fit (Out of nothing, nothing comes)
I wrote the following VBA code which checks the Range C4:R4 for the item selected in the ProjTitleComboBox. As I have written in the following comments - when I test this code, ProjTitleComboBox.Text contains "Administration" and so does cell "C4" therefore a match should be found but Find returns nothing!
Has anyone got any ideas as to what could be going wrong?
Code:
'In this instance ProjTitleComboBox.Text contains "Administration"
Set duplicateProjectRange = wsBcTS.Range("C4:R4").Find(What:=ProjTitleComboBox.Text, LookIn:=xlValues)
If Not duplicateProjectRange Is Nothing Then
MsgBox "This project already exists on your timesheet"
End If
MsgBox wsBcTS.Range("C4").Value 'displays "Administration"
Your help would be much appreciated!
Clive
![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
Ex nihilo, nihil fit (Out of nothing, nothing comes)