Not a Member Yet,
Click here to Register
How do you like the new design?
It's cool, great job
[tally: 70%] 70%
It's okay
[tally: 20%] 20%
Its OK but I liked the old layout better
[tally: 0%] 0%
Please bring the old one back
[tally: 10%] 10%

votes: 10

ID: 147
Viewed: 2893
Added: Apr 28, 2002
Snippet uploaded by: snippet
Written By: unknown
Demo: Sorry, no demo

User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

API call for save as..

Highlight all by clicking in box

Highlight All
sub click()
Dim filenum As Integer
Dim Ingredients As String
Dim lab As String
Dim recname As String
Dim proc As String

Ingredients = TxtIngredients.Text
lab = Label1.Caption
recname = LblName.Caption
proc = TxtProcessTest

ofn.lStructSize = Len(ofn)
ofn.hwndOwner = FrmResult.hwnd
ofn.hInstance = App.hInstance
ofn.lpstrFilter = "Document Files (*.doc)" + Chr$(0) + _
"*.doc" + Chr$(0) + "Text Files (*.txt)" + Chr$(0) + _
"*.txt" + Chr$(0) + "All Files (*.*)" + Chr$(0) _
+ "*.*" + Chr$(0)
ofn.lpstrFile = Space$(254)
ofn.nMaxFile = 255
ofn.lpstrFileTitle = Space$(254)
ofn.nMaxFileTitle = 255
ofn.lpstrInitialDir = CurDir
ofn.lpstrTitle = "Dialog Title"
ofn.flags = 0
Dim a
a = GetSaveFileName(ofn)

If (a) Then
MsgBox "File Saved To: " + Trim$(ofn.lpstrFile)
'FileSave Stuff Here

ofn.lpstrFile = Left(ofn.lpstrFile, InStr(ofn.lpstrFile, Chr$(0)) - 1)
If Right$(LCase$(ofn.lpstrFile), 4) <> ".txt" Then
ofn.lpstrFile = ofn.lpstrFile & ".txt"
End If

Open ofn.lpstrFile For Output As #1
Print #1, lab; Space$(3); recname
Print #1, Ingredients; proc
Close #1
MsgBox "Cancel was pressed"
End If
Close #1

End Sub;

No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.

Replying to a Comment...

Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2017 All Rights Reserved. Conditions