Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. selected items in list

selected items in list

Scheduled Pinned Locked Moved Visual Basic
databasehelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    peteyshrew
    wrote on last edited by
    #1

    sorry i explained the query wrong. i need to use a button to replace the selected item with the one above, and do the same with the one below. i suppose this code could be modified a bit but dont know how. can anyone help me please. Select Previous: ListBox1().SelectionMode = SelectionMode.One If Me.ListBox1.SelectedIndex > 0 Then Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex - 1 End If Select Next: ListBox1().SelectionMode = SelectionMode.One If Me.ListBox1.SelectedIndex < Me.ListBox1.Items.Count - 1 Then Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1 End If

    G 1 Reply Last reply
    0
    • P peteyshrew

      sorry i explained the query wrong. i need to use a button to replace the selected item with the one above, and do the same with the one below. i suppose this code could be modified a bit but dont know how. can anyone help me please. Select Previous: ListBox1().SelectionMode = SelectionMode.One If Me.ListBox1.SelectedIndex > 0 Then Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex - 1 End If Select Next: ListBox1().SelectionMode = SelectionMode.One If Me.ListBox1.SelectedIndex < Me.ListBox1.Items.Count - 1 Then Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1 End If

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Continue in the same thread instead of creating a new one.

      --- It's amazing to see how much work some people will go through just to avoid a little bit of work.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups