Results 1 to 7 of 7

Thread: [RESOLVED] Am I allowed to click on a listview and have a form pop up?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Resolved [RESOLVED] Am I allowed to click on a listview and have a form pop up?

    Hey guys I have a listview called report.

    Now I have a form called probdes.

    Is there a way so when I click on a item in the listview, the prob des form pops up and whatever was in the first column of the row item I clicked on goes in label7, the second column row item goes in label8, and the third in label9, the fourth in label10, and the last in label11?

    thank you!

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Am I allowed to click on a listview and have a form pop up?

    Sure, just use the ListView1_DblClick() event.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: Am I allowed to click on a listview and have a form pop up?

    alrighty then, but what format do I use to refer to the first listview column data for that row going in label7, and so on?

  4. #4

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: Am I allowed to click on a listview and have a form pop up?

    Alrighty then, but when I use THIS code.

    probdes.Label7.Caption = Report.SelectedItem.ListSubItems(0)

    I get an index out of bounds error highlighting it.

  6. #6

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: Am I allowed to click on a listview and have a form pop up?

    Excellent thank you!

Posting Permissions

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



Click Here to Expand Forum to Full Width