tomanderson12
Member
- Joined
- Jan 21, 2008
- Sythe Gold
- 0
- Messages
- 53
Hey, I recently formatted my harddrive due to some error on the hard drive i couldnt seem to fix anyway if any one remembers i created a notepad a while back and you could save files so i wanted to create the program again but when i went to code the save file it came up with an error
Thats the code for the save, it works and you can save a file but if you click save then change your mind about saving the file and close the dialog box it 'crashes' the entire notepad
Code:
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
Thats the code for the save, it works and you can save a file but if you click save then change your mind about saving the file and close the dialog box it 'crashes' the entire notepad




