Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21192

Adding and removing data from a list box using a command button in VB 6

$
0
0
Hi all,

I have imported data from an excel file into a list box in a program I'm working on. I have coded a number of command button so that if a certain button is clicked, certain information is displayed in the list box.
So I click a command button and information is displayed in the list box. But I want to be be able to click on another command button and display totally different information from the same Excel file which will replace the original information.
In other words, when I click say, ''button 1'', ''Text 1'' appears in the list box. But I want to be then able to click say, ''button 2'' and by clicking button 2, ''Text 1'' disappears from the listbox and is replaced by ''Text 2''.

As a side note, I have 6 command buttons in total, all of which display a different chunk of information from the same Excel file when displayed.

I would appreciate any help on this matter

Thanks

Viewing all articles
Browse latest Browse all 21192

Trending Articles