Results 1 to 4 of 4

VBA Error on a Form

Threaded View

  1. #1
    Registered User
    Join Date
    03-06-2006
    Location
    Clayton, NC
    MS-Off Ver
    MS Office 2010
    Posts
    61

    Question VBA Error on a Form

    Hi,

    I created a Search Form on one sheet and I am trying to get it to search a range of data on a differant sheet. When I click the Search button, I get the following error message:

    Run-time error '1004':
    Select method of Range class failed.

    With rng
            Set c = .Find(strFind, LookIn:=xlValues, lookat:=xlPart)
            If Not c Is Nothing Then    'found it
                c.Select                                           <-------------------- Highlighted
                With Me    'load entry to form
                    .TextLastName.Value = c.Offset(0, 1).Value
                    .TextFirstName.Value = c.Offset(0, 2).Value
                    .TextMI.Value = c.Offset(0, 3).Value
    The button 'Single' that launches the Form 'UserForm3' is on the "Single Claims Report" sheet. The Form is supposed to be searching the data on the "ClaimsData" sheet. If I launch the Form from the "ClaimsData" sheet, it works great, but I need it to launch from the "Single Claims Report" sheet.

    Any help would be greatly appreciated!

    Thanks,
    Jeff
    Attached Files Attached Files
    Last edited by RevJeff; 01-18-2012 at 05:43 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1