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

Thread: Object Doesn't support this property or method runtime 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 runtime error

    Greetings,

    I am receiving an error on the line immediately below in the script further below. Not exactly sure why this is occurring, I seem to have used this structure in the past with success.
    Code:
    For Each ws In PA
    This is the beginning part of the script, no need to look over most of the variables

    Code:
    Dim ws As WorksheetDim PA As Workbook
    Dim TA As Workbook
    Dim A As Integer
    Dim B As Integer 'Prominent Point max/min range (sensitivity)
    Dim C As Integer
    Dim D As Integer
    Dim E As Integer
    Dim F As Integer
    Dim G As Integer
    Dim H As Integer
    Dim I As Integer
    Dim J As Integer
    Dim K As Integer
    Dim L As Integer
    Dim M As Integer
    Dim N As Integer
    Dim AA As Range
    Dim BB As Range
    Dim CC As Range
    Dim DD As Range
    Dim R1 As Range
    Dim R2 As Range
    
    
    
    
    
    
    
    
    Set TA = Workbooks("COMM_TRE.xls")
    Set PA = Workbooks("COMM_PA.xls")
    
    
    
    
    
    
    
    
    For Each ws In PA

  2. #2
    Board Regular Norie's Avatar
    Join Date
    Apr 2004
    Location
    Stirling, Scotland
    Posts
    74,110
    Post Thanks / Like
    Mentioned
    29 Post(s)
    Tagged
    2 Thread(s)

    Default Re: Object Doesn't support this property or method runtime error

    Try this.
    Code:
    For Each ws In PA.Sheets
    If posting code please use code tags.

  3. #3
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    14,262
    Post Thanks / Like
    Mentioned
    259 Post(s)
    Tagged
    19 Thread(s)

    Default Re: Object Doesn't support this property or method runtime error

    it should be
    Code:
    For Each ws In PA.Worksheets
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 2003 & 2013 on Win 7

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

    Default Re: Object Doesn't support this property or method runtime error

    That would be it! Thanks

  5. #5
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    14,262
    Post Thanks / Like
    Mentioned
    259 Post(s)
    Tagged
    19 Thread(s)

    Default Re: Object Doesn't support this property or method runtime error

    Glad we could help & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 2003 & 2013 on Win 7

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
  •