Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Object doesn't support this property or method: Error

  1. #1
    Board Regular
    Join Date
    Jul 2014
    Posts
    407
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Object doesn't support this property or method: Error

    Greetings,

    The line below is giving me a runtime error "Object doesn't support this property or method"
    Code:
    A = PA.ws.Range(Cells(Rows.Count, "A")).End(xlUp).Row
    A is an integer variable. Can I use ".row" with an integer variable?

  2. #2
    Board Regular Norie's Avatar
    Join Date
    Apr 2004
    Location
    Stirling, Scotland
    Posts
    73,724
    Post Thanks / Like
    Mentioned
    24 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Object doesn't support this property or method: Error

    The problem is with PA.ws.

    Based on your previous posts PA is a workbook reference and ws is a worksheet in that workbook so all you need is ws.

    Oh and you don't need Range(Cells(...)), so.
    Code:
    A = ws.Cells(Rows.Count, "A").End(xlUp).Row
    If posting code please use code tags.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •