?
Solved

Loading a file from a list to a Text Box

Posted on 2003-11-10
2
Medium Priority
?
201 Views
Last Modified: 2010-05-03
How do you load a file from a List box to a text box.

I'm using Microsoft Direct Text-to-Speech and it wont speak from the list box but it will from the text box.
The file is loaded to the list box from the C drive.

So how is this possible???
0
Comment
Question by:Reachtabhair
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Expert Comment

by:_agj_
ID: 9714784
loading meaning?

if u just want the listbox text to be loaded in the text box, do a

text1.text = list1.text

or

text1.text = list1(list1.index)

if u want to load the file whose name is in the listbox to the textbox then:

dim var
open list1.text for input as #1

input #1, var

close #1

text1.text  = var

Or

dim str1 as string
open list1.text for input as #1

text1.text = ""

while not eof(1)
line input #1, str1
text1.text = text1.text & str1
wend

close #1



0
 
LVL 1

Accepted Solution

by:
Shaztronics earned 150 total points
ID: 9719972
Dim counter
counter = 0
Do until counter = list1.listcount
Text1.text = Text1.text & List1.list(counter) & vbcrlf
Loop
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question