Consulting

Results 1 to 3 of 3

Thread: Columns in ListView

  1. #1

    Columns in ListView

    Hello Everyone,

    I am trying to follow the tutorial below.

    http://www.vbdotnetheaven.com/Upload...ewControl.aspx

    However, when I come to the point to add multiple columns. I get stuck..

    [VBA]
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ' Adding ListView Columns
    ListView1.Columns.Add("Emp Name", 100, HorizontalAlignment.Left)
    ListView1.Columns.Add("Emp Address", 150, HorizontalAlignment.Left)ListView1.Columns.Add("Title", 60, HorizontalAlignment.Left)
    ListView1.Columns.Add("Salary", 50, HorizontalAlignment.Left)ListView1.Columns.Add("Department", 60, HorizontalAlignment.Left)
    End Sub
    [/VBA]

    What is wrong with the code? Can anybody help me please?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    ARe you trying to do this with a form in Excel VBA? There is no Form_LOad event in an Excel userform.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    thread also posted on: http://www.ozgrid.com/forum/showthre...light=eureka18

    please continue overthere

Posting Permissions

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