Designer6
02-07-2008, 10:12 AM
Hi All,
This is Ridicules. The find function in vba fail to find three or four letter words like "CEO", "EATS", "CFO" ect. It gives me an error "Method 'Range' of object '_Global' failed. Run-Time Error 1004". But it works fine on five letter words or more like "Buddy". As long the caption is 5 letter words and above it works. Below is my code could anyone give me some hints or suggestions on how to solve this problem.
If CheckBox1.Value = True Then
If Not Sheets(Sheet).Cells.Find(CheckBox1.Caption) Is Nothing Then Range(CheckBox1.Caption).EntireColumn.Hidden = False
End If
This is Ridicules. The find function in vba fail to find three or four letter words like "CEO", "EATS", "CFO" ect. It gives me an error "Method 'Range' of object '_Global' failed. Run-Time Error 1004". But it works fine on five letter words or more like "Buddy". As long the caption is 5 letter words and above it works. Below is my code could anyone give me some hints or suggestions on how to solve this problem.
If CheckBox1.Value = True Then
If Not Sheets(Sheet).Cells.Find(CheckBox1.Caption) Is Nothing Then Range(CheckBox1.Caption).EntireColumn.Hidden = False
End If