Results 1 to 6 of 6

error 1004 select method of range class failed

Threaded View

  1. #1
    Registered User
    Join Date
    03-23-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    14

    error 1004 select method of range class failed

    Hi my code is not working but looks correct please have a look, I have debugged it and put the bit which it told me to correct in green below:

    
    Dim friCost As Range
    Dim friPrice As Variant
    Dim totalFriPrice As Currency
    
    Range("A1").Select
    
    x = ActiveCell.CurrentRegion.Rows.Count 'This uses x to locate the active cell
    
    Set friCost = Worksheets("Bookings").Range("A2:A" & x) 'This sets the range
    
    
    For Each friPrice In friCost
    
        
        If friPrice = "Friday 4th October" Then
        
           friPrice.Select
            totalFriPrice = totalFriPrice + ActiveCell.Offset(0, 3).Value
        
        End If
            
            
    Next
            
    MsgBox ("Friday Income = £" & totalFriPrice)
    Last edited by Lee_wwfc; 03-23-2013 at 12:10 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