|
-
Feb 14th, 2003, 10:34 PM
#1
Thread Starter
New Member
Few very Basic Questions need quick advice
I am kinda new in VB, appreciate somebody's advice on these few simple (may be idiot) questions.
1. How do trap user's input from common dialog box message? said user click a "Cancel" or "Yes" on the printing dialog, how could it trap the user's input and make decision accordingly?
2. I save some string onto text file in this way
Print #1, string1, string2, string3
I wish to read the string1, 2 and 3 back to string array individually with split function. What is the delimiter I should use? I used to use "Write", instead of "Print", the 3 strings was separated by "," This is easy to split with "," as the delimiter. But to make the output text file look better, I change to use "Print" instead, then the 3 strings became separated by some space/tab. I tried to use vbTab as the delimiter, but it seems does not work. Please help
3. This is an real idiot question, how do it print " You & Me" on the caption box? The "&" seems like a special character.
-
Feb 14th, 2003, 10:39 PM
#2
#1 Set the CancelError property of the commondialog control to True. Trap for an error, and if the cancel button is clicked, you will know.
#3 Try "You && Me"
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Feb 14th, 2003, 10:39 PM
#3
PowerPoster
Well
1) Look into the .FileName property... (if using for file open or file save) If = "", the User selected cancel...
2) VB Example - Basic Textfile Example
3) Msgbox "You && Me"
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Feb 14th, 2003, 10:42 PM
#4
Re: Well
Originally posted by James Stanich
1) Look into the .FileName property... (if using for file open or file save) If = "", the User selected cancel...
Careful here. The FileName property can carry over between calls to Showxxxx.. Unless you set the property back to "" after each call, this method is unreliable.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Feb 14th, 2003, 10:45 PM
#5
PowerPoster
Re: Re: Well
Originally posted by crptcblade
Careful here. The FileName property can carry over between calls to Showxxxx.. Unless you set the property back to "" after each call, this method is unreliable.
Sorry. This is true. I had problems with this in the pass, but always set to "" before showing the CD. Good point, though...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|