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
Solved

save as a file

Posted on 2000-05-01
10
159 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
  • 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 100 total points
ID: 2766686
RichTextBox1.SaveFile "c:\test.rtf", rtfRTF

Change the rtfRTF to rtfText if you wish to save as plain text.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

828 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