Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2007

Tip: Looking for answers? Try searching our database.

VB list box how to obtain text in selected rows ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
wojjed@gmail.com - 16 Oct 2007 13:13 GMT
Hi

Here's how i fill the list :

Private Sub CommandButton1_Click()

Dim sFilename As Variant

sFilename = Application.GetOpenFilename("Excel files (*.xls; *.csv),
*.xls; *.csv", 0, "Wybierz pliki", 0, True)

  For Y = 1 To UBound(sFilename)
        ListBox1.AddItem (sFilename(Y))
   Next

End Sub

When files are selected i want to open them using  Workbooks.Open
(sFilename(Y)) - but in loop that method doesnt work - why ? And how
to obtain text in selected rows ? Supose i have
Private Sub CommandButton2_Click() in which i want to open selected
files - how to do it ?

thx for all sugestions
Terry - 16 Oct 2007 15:35 GMT
Are you sure you are posting in the right group?

????Dim sFilename as Variant?????
Sounds like VB6 to me, in which case look at the ListBox.Selected(index)
property.

If .Net, look at ListBox.SelectedItems property.

Signature

Terry

> Hi
>
[quoted text clipped - 20 lines]
>
> thx for all sugestions

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.