Results 1 to 6 of 6

Select method of Range class failed" error message

Threaded View

Session101 Select method of Range class... 11-12-2009, 08:36 PM
Palmetto Re: Select method of Range... 11-12-2009, 10:11 PM
Session101 Re: Select method of Range... 11-13-2009, 12:59 AM
protonLeah Re: Select method of Range... 11-13-2009, 01:47 AM
Marzuk Re: Select method of Range... 11-13-2009, 01:54 AM
Session101 Re: Select method of Range... 11-13-2009, 11:50 AM
  1. #1
    Registered User
    Join Date
    09-03-2004
    Posts
    9

    Select method of Range class failed" error message

    Hey guys,

    My macro is searching for a string in a cell, then upon finding it, select the entire row and copy/paste it to another sheet. However, I am getting a "Select method of Range class failed" error message when I try to select the entire row. Can someone check this out?
     If ComboBox1.Value = "CA" Then
            While Len(Sheets("Trades").Range("W" & CStr(LSearchRow)).Value) > 0
               If Sheets("Trades").Range("K" & CStr(LSearchRow)).Value = "CA"    Then
                    Sheets("Trades").Rows(CStr(LSearchRow) & ":" & CStr(LSearchRow)).Select
                    Selection.Copy   ' This is where the error hits
                    
                    'Paste row into Summary sheet in next row
                    Sheets("Summary").Select
                    Rows(CStr(LCopyToRow) & ":" & CStr(LCopyToRow)).Select
                    ActiveSheet.Paste
        
                    'Move counter to next row
                    LCopyToRow = LCopyToRow + 1
                
                    'Go back to Sheet1 to continue searching
                    Sheets("Trades").Select
                End If
                LSearchRow = LSearchRow + 1
            Wend
    End If
    TIA!
    Last edited by Session101; 11-13-2009 at 12:59 AM.

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