Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Clearing FileName in Save As...


Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2003, 12:38 PM
Ulysses Ulysses is offline
Freshman
 
Join Date: Oct 2003
Location: Canada
Posts: 28
Default Clearing FileName in Save As...


Good day to all those in coding land!

Curious about something.

Is there a way to clear the FileName from a "Save As.." Common Dialog Popup.

Here is the full situation.

I open a file using the following:

Code:
With CommonDialog1 .CancelError = True .Filter = "Excel Files (*.xls)|*.xls" .FilterIndex = 1 .DialogTitle = "Select the file..." .ShowOpen End With

Then shortly after the file is opened, i have to save ANOTHER file using the same Commong Dialog Box.

Code:
With frmSort.CommonDialog1 .CancelError = True .Filter = "Excel Files (*.xls)|.xls" .DialogTitle = "Save " + strFileNumber + " File As..." .ShowSave .FileName = "" End With

For some reason though. When i go to save the file it keeps the file name from the OPEN procedure. I want to have it BLANK where the user inputs the File Name in the Save As.. dialog.

Htanx for the help in advance,

Ulysses
Reply With Quote
  #2  
Old 10-11-2003, 01:09 PM
JDYoder's Avatar
JDYoder JDYoder is offline
Senior Contributor
 
Join Date: Aug 2001
Posts: 905
Default

Set .FileName to "" before you call the .ShowSave
Reply With Quote
  #3  
Old 10-11-2003, 01:37 PM
Ulysses Ulysses is offline
Freshman
 
Join Date: Oct 2003
Location: Canada
Posts: 28
Default

Arrrggg...

I can't believe it was that simple. I thought i'd tried that. Guess not.

stupid me.
thanx
Reply With Quote
  #4  
Old 10-11-2003, 02:55 PM
JDYoder's Avatar
JDYoder JDYoder is offline
Senior Contributor
 
Join Date: Aug 2001
Posts: 905
Default

hehe. Not to worry. Been there, done that.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Save vs Save As broadcast-guy General 3 09-25-2003 03:35 PM
Save Word document filename as field JLB500 Word, PowerPoint, Outlook, and Other Office Products 2 08-14-2003 12:23 PM
Problems saving under a filename asbestos General 8 06-28-2003 07:51 AM
How to save FileName without File Extension? Dade_Murphy General 14 06-15-2003 10:57 AM
COMMON DIALOG - save, open, filetypes, etc... UseTheMan General 1 05-23-2001 11:08 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->