+ Reply to Thread
Results 1 to 3 of 3

Run-Time error '438'

Hybrid View

  1. #1
    Registered User
    Join Date
    11-03-2007
    Posts
    2

    Run-Time error '438'

    Hello..
    could anyone help me with this below macro?
    whats wrong with it, i receive error massage for the red line

    Dim i, k As Integer
    Dim N, B As String
    i = 1: k = 1
    
    
    line1:
    If Workbooks("download.xls").Worksheets("Label List").Cells(i + 2, 5).Value = 0 Then
    MsgBox "Filtering finished"
    GoTo line2
    
    Else
    
    
    If "N" = Left(Workbooks("download.xls").Worksheets("Label List").Cells(i + 2, 5), 1) Or "B" = Left(Workbooks("download.xls").Worksheets("Label List").Cells(i + 2, 5), 1) Then
    Workbooks("download.xls").Worksheets("Label List").Cells(i + 2, 1).Resize(1, 22).Copy
    Workbooks("label system_main control.xls").Worksheets("LGEIN").Cells(k + 2, 1).Paste
    
    
    k = k + 1
    i = i + 1
    GoTo line1
    
    Else
    i = i + 1
    GoTo line1
    End If
    
    line2:
    End If
    
    
    End Sub

    error massage:
    -------------------------------------------------
    Run-Time error '438'

    Object doesn't support this method
    -------------------------------------------------

    thank you
    juna-
    Last edited by dominicb; 11-03-2007 at 05:54 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    Try this instead. The paste syntax is wrong.
    Workbooks("download.xls").Worksheets("Label List").Cells(i + 2, 1).Resize(1, 22).Copy _
        Destination:=Workbooks("label system_main control.xls").Worksheets("LGEIN").Cells(k + 2, 1)

  3. #3
    Registered User
    Join Date
    11-03-2007
    Posts
    2
    ya it's work!!

    thanks

+ Reply to Thread

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