Solved

save in commondialog

Posted on 1998-07-07
4
212 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
[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
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
swilt earned 10 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

734 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