Consulting

Results 1 to 2 of 2

Thread: Hasheaders in listobjects.add method

  1. #1

    Hasheaders in listobjects.add method

    Why this is giving error "Run-time error '5': Invalid procedure call or argument"
    Workbooks("320_033110_Doral_Working").Sheets("Laser").ListObjects.Add(Sourc e:=Workbooks("320_033110_Doral_Working").Sheets("Laser").Range("A6:R260"),TableStyleName:=xlyes).Name = "LaserList"

    Why not for this?
    Workbooks("320_033110_Doral_Working").Sheets("Laser").ListObjects.Add(Sourc e:=Workbooks("320_033110_Doral_Working").Sheets("Laser").Range("A6:R260")). Name = "LaserList"

    What the problem with that argument Tablestylename. I believe the argument name itself is wrong. It has to be Hasheaders. Am I right?

  2. #2
    VBAX Mentor
    Joined
    Jun 2004
    Posts
    363
    Location
    I think the TableStyleName only applies if you are importing data from an external source.

Posting Permissions

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