Consulting

Results 1 to 3 of 3

Thread: Find Function Fail on Three-Four Letter Words

  1. #1

    Find Function Fail on Three-Four Letter Words

    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

  2. #2
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    That works fine for me. What version of Excel and do you definitely have ranges named "CEO" etc. on the activesheet?
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Quote Originally Posted by rory
    That works fine for me. What version of Excel and do you definitely have ranges named "CEO" etc. on the activesheet?

    I have Excel 2003
    Last edited by Designer6; 02-07-2008 at 11:19 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •