Solved

Loading text from an external file, can I use a text file or would a ms access type database work better

Posted on 2006-06-21
3
143 Views
Last Modified: 2010-04-30
Hi All

I need to load text into an application from an external file. The external file will be duplicated in different languages and which ever language is selected that file will load in. I already use this for my forms etc.
However in one form I am continually loading the text into a rich text box and as the text is loaded from an array (i. e. it is all loaded every time it is accessed) after so many lines it crashes the software.
With the same code if it is just direct text in the code it no longer crashes.
I need a more efficient way to load the text and am considering something like an access database file.
At present to call the text I just use text(56) which calls the text in line 56
What would be the most memory efficient way to implement this
Ideas??
0
Comment
Question by:eneate
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
dancebert earned 500 total points
ID: 16955328
Resource Files were designed specificaly for this.

http://www.codetoad.com/vb_resource_files.asp
0
 

Author Comment

by:eneate
ID: 16961326
OK, I've tried a resource file and can add text as loadresstring(101) but I need tobe able to have several identical res files each in a different language so that if the user has selected french, when the code runs loadresstring(101) will load in the french file and not the english one.
How can I differntiate between the different resource files. I don't want to have to complile a different exe for each language.
0
 

Author Comment

by:eneate
ID: 16963572
Thanks I've figured it out and it will work fine, thanks for the response.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now