Results 1 to 5 of 5

invalid qualifier error

Threaded View

  1. #1
    Registered User
    Join Date
    09-22-2009
    Location
    Hobart, Australia
    MS-Off Ver
    Excel 2007
    Posts
    16

    Question invalid qualifier error

    i keep getting errors when im trying to run this bit of code

    Private Sub signout_Click()
    Dim ws, ws2, ws3, ws4 As Worksheet
    Dim iRow, iRow2, iRow3 As Long
    Dim myRng2 As Range
    Dim staffin, staffout As String
    Set ws = Workbooks("payslips").Worksheets("Employee Details")
    Set ws2 = Workbooks("payslips").Worksheets("Sign In-Out")
    Set ws3 = Workbooks("payslips").Worksheets("Weekly")
    Set ws4 = Workbooks("payslips").Worksheets("Record of all Sign In-Out")
    
    iRow = Cells.Find(what:=Me.staffout, After:=ws2.Range("B2"), LookIn:=xlFormulas, LookAt _
            :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
            False, SearchFormat:=False).Row
            
    ws2.Cells(iRow, 5).Value = Time
    
    
    iRow2 = Cells.Find(what:=ws2.Cells(iRow, 1).Value, After:=ws3.Range("A2"), LookIn:=xlFormulas, LookAt _
            :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
            False, SearchFormat:=False).Row
    
    ws3.Cells(iRow2, 5).Value = ws3.Cells(iRow2, 5).Value + ws2.Cells(iRow, 6).Value
    
    
        'finds first empty row in database
        iRow3 = ws4.Cells(Rows.Count, 1) _
        .End(xlUp).Offset(1, 0).Row
    
     ' the current error is iRow3 is an invalid qualifier on the below line
    ws2.Range(iRow.Row).Cut Destination:=ws4.Range(iRow3.Row)
    
    
    End Sub
    I'm not even sure if this is the best way to do it. Any tips or ideas would be greatly appreciated

    Regards Mag
    Last edited by Maglor; 09-30-2009 at 09:15 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