Hi and welcome to Tek-Tips. Read through faq222-2244 to see how to get the best from this forum. It will give guidelines on how to ask the right questions to get you the answers you want.
I guess from your reply that you didn't try the code that
Error7 showed you, or didn't look it up in VBHelp to see how it is used. You are also using a reserved word ('file') as a variable name, which is not recommended. It's also good practise to use the FreeFile function to get a file handle.
Try this

just a snippet, NOT production code!)
Code:
Dim strFile as string
Dim intHandle As Integer
intHandle = FreeFile
CommonDialog1.InitDir = "c:\"
CommonDialog1.FileName = "Fred.txt"
CommonDialog1.ShowSave
strFile = CommonDialog1.FileName
If strFile <> "" Then
Open strFile for Output as #intHandle
Write #intHandle, "BlaBlaBla"
Close #intHandle
End if
To get started next time, try using VBHelp or MSDN on line to get the simple syntax questions sorted, as it's generally not expected that you will be offered full code answers
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller