Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

save in commondialog

Posted on 1998-07-07
4
Medium Priority
?
221 Views
Last Modified: 2010-05-03
I want to save text5.text with the commondialog. I use:
Private Sub save_Click()
CommonDialog1.CancelError = True
CommonDialog1.DialogTitle = "Commando save"
On Error Resume Next
CommonDialog1.ShowSave
End Sub

My problem is, I don't know how to specify what I want to save.
Sorry, thats all my points.
0
Comment
Question by:mkdjo
  • 2
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
swilt earned 40 total points
ID: 1465110
Use FileName

Private Sub save_Click()
    CommonDialog1.CancelError = True
    CommonDialog1.DialogTitle = "Commando save"
    CommonDialog1.FileName = "MyFile.txt"
    On Error Resume Next
    CommonDialog1.ShowSave
End Sub

0
 

Author Comment

by:mkdjo
ID: 1465111
I want to save the content of a textbox, for example text5.text. How can I choose to save this?
0
 
LVL 2

Expert Comment

by:swilt
ID: 1465112
As in CommonDialog1.FileName = Text5.Text, the variable holding the filename;

or

dim fh as integer

fh = freefile
open "MyFile.txt" for output as #fh
print #fh, Text5.Text  ' Could use Write #fh, Text5.Text
close #fh
0
 

Author Comment

by:mkdjo
ID: 1465113
Oh yes, thank you very much.
Martin

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
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…
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

772 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