Results 1 to 4 of 4

Codeing showes error in 2000 but works in 2007.

Threaded View

  1. #1
    Registered User
    Join Date
    02-08-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    80

    Codeing showes error in 2000 but works in 2007.

    Hi

    Can some assist me, below codeing works fine in excel 2007 BUT doesn't work in excel 2000. I have highlighted in red.

    Private Sub CmdTransferStorToUsed_Click()
        
        Dim LR As Long, I As Long 'date & name
        Dim rFind As Range, sFind As String 'slot transfer
    
        Sheets("Consumables Used From AM Rack").Unprotect "consumables" 'unprotect sheet
        
        sFind = Range("K13").Value ' part of slot transfer
    
        With Sheet6.Columns(2)
            Set rFind = .Find(What:=sFind, LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, _
                          SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)            
                    If Not rFind Is Nothing Then
                    With Sheet8.Cells(Rows.Count, 2).End(xlUp)(2)
                        .Value = rFind.Offset(, 1).Value
                        .Offset(, 1).Value = rFind.Offset(, 3).Value
                    End With
                    rFind.Offset(, 1).Clear
                    rFind.Offset(, 3).Clear
                End If
        End With
        
        With Sheets("Main Menu") 'part of date & name
            'LR = .Range("M" & Rows.Count).End(xlUp).Row
            'For i = 19 To LR - 2 Step 4
                'With .Range("M" & i)
                 With .Range("M19") ' new
                    .Copy Destination:=Sheets("Consumables Used From AM Rack").Range("A65535").End(xlUp).Offset(1, 0)
                    .ClearContents
                    'With .Offset(2)
                     With .Offset(1) ' new offset 1 row, (ie from M19 to M20)
                        .Copy Destination:=Sheets("Consumables Used From AM Rack").Range("D65535").End(xlUp).Offset(1, 0)
                        .ClearContents
                    End With
                End With
            'Next i
        End With
        
        Sheets("Consumables Used From AM Rack").Protect "consumables" 'proctects the sheet
        
        Range("K13:M14").Select
        Selection.ClearContents
    
    End Sub
    Please can someone assist me.
    Last edited by coolhit; 07-27-2009 at 07:44 PM. Reason: forgot code tag.

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