Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

save as a file

Posted on 2000-05-01
10
Medium Priority
?
163 Views
Last Modified: 2010-05-02
I would like to save the contants of a richtextbox that im using to capture data from an external source via the comm port. I want the file to open when I click the capture button and close when I click another. Also the file will be saved as a date so 5199.log. I have the date format and comm port working its just the file open/save. I also dont want the commondialog to appear.
0
Comment
Question by:smurray
[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
  • 5
  • 3
  • 2
10 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2766626
richtextbox has a built in save method

richtextbox.savefile "pathname"
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2766630
likewise, it has a loadfile method

richtextbox.loadfile "pathname"
0
 
LVL 1

Accepted Solution

by:
jgravelle earned 400 total points
ID: 2766686
RichTextBox1.SaveFile "c:\test.rtf", rtfRTF

Change the rtfRTF to rtfText if you wish to save as plain text.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 28

Expert Comment

by:AzraSound
ID: 2766704
jgravelle...work on your comment posting techniques
0
 

Author Comment

by:smurray
ID: 2766719
What I would like is to open the file and gather all information and then after 30 minutes close the file but if by chance the user exits without closing all data up till then will still be kept.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2766729
then in the forms Unload event just do a save

richtextbox.savefile "C:\5199.log", 1

this will ensure it is saved before the app ends
0
 
LVL 1

Expert Comment

by:jgravelle
ID: 2766732
azrasound..it doesn't look like your technique is much better.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2766747
the point is your answer is the same as my comment, if you havent noticed, it is the general procedure to post comments at this site, especially when your answer is just a recap of a previously posted comment.
0
 
LVL 1

Expert Comment

by:jgravelle
ID: 2766777
I apologize azrasound...I thought I was posting a comment.
0
 

Author Comment

by:smurray
ID: 2792789
Is there a way to poll all the data at startup of the device. I want to open the file. Turn on the system and capture everything during the boot and once compleate close it. Any thoughts?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

721 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