![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
|
Encryption Program
I am making a little text encryption tool. The problem I have is that I don't know how to make the little open/ save window pop up and let me visually select where to open and save files to and from. Can someone tell me how to do that?
|
|
|
|
|
|
#2 |
|
Newbie
Join Date: Feb 2006
Location: Bedford
Posts: 2
Rep Power: 0
![]() |
i have the code, this would be an example with 2 command buttons, one textbox and you need to add the component Microsoft Common Dialog Control 6.0
opening files:
Private Sub cmdopen_Click()
Dim filelocation As String
' show open box
commondialog1.ShowOpen
filelocation = commondialog1.FileName
' input files into text1.text
Open filelocation For Input As #1
Do Until EOF(1)
Input #1, Data
text1.text = text1.text + Data + vbNewLine
EOF (1)
Loop
Close #1
End Subsaving files:
Private Sub cmdsave_Click()
Dim filelocation As String
' loads save as box
commondialog1.ShowSave
filelocation = commondialog1.FileName
' append saves over file if it assists
Open filelocation For Append As #1
Print #1, text1.text
Close #1
End Sub |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|