Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Open Save Digaloge box in VB Script

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,3098
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Open Save Digaloge box in VB Script
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Open Save Digaloge box in VB Script - 5/24/2005 1:55:49 AM   
  kya_karey

 

Posts: 39
Score: 0
Joined: 5/11/2005
From: India
Status: offline
Can anyone provide me the scipt for to open save Dialogue box in VB script.
By Save Dialoguebox I mean if u want to save file you just go to the file and click on the option called Save As and one pop window or dialogue box will come where you can give the name of the file and save it where ever u want. I want to open the same dialogue box by clicking the button "Save"

my script is like below
<html>
<body>
<input type="Button" value="Save" and name ="Save">
</input>
</body>
</html>
 
 
Post #: 1
 
 Re: Open Save Digaloge box in VB Script - 5/24/2005 1:59:38 AM   
  Zifter


Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
Here is a previous post with a similar question.
If you use the search option of this forum, you probably are going to find others aswell...

(in reply to kya_karey)
 
 
Post #: 2
 
 Re: Open Save Digaloge box in VB Script - 5/24/2005 2:30:15 AM   
  kya_karey

 

Posts: 39
Score: 0
Joined: 5/11/2005
From: India
Status: offline
Thanks zifter.

I am getting the dialogue box but My file type is ".xml"
And when I am changing the file type it's saving nothing.

Can you just tell me how to save the type of the File ".xml"

(in reply to kya_karey)
 
 
Post #: 3
 
 Re: Open Save Digaloge box in VB Script - 5/24/2005 9:17:32 PM   
  Zifter


Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
The "FileType" property of the FileSave dialog object is for displaying purposes only. It hasn't got any effect on the saving of the file.
To save a file as an XML file, you only have to make sure the value of the "FileName" property has got the correct extension.

HTH

(in reply to kya_karey)
 
 
Post #: 4
 
 Re: Open Save Digaloge box in VB Script - 5/25/2005 7:30:48 PM   
  kya_karey

 

Posts: 39
Score: 0
Joined: 5/11/2005
From: India
Status: offline
Zifter, for to save the xml file i am writing the follwoing script
but than after it doesn't save anyhting in the file.
Would you please tell me if there is something wrong in my script code ??

Set objDialog = CreateObject("SAFRCFileDlg.FileSave")
objDialog.FileName = "C:\Newtemplate.xml"
objDialog.FileType = "XML Document xml"
intReturn = objDialog.OpenFileSaveDlg
If intReturn Then
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(objDialog.FileName)
objFile.WriteLine Date
objFile.Close
End If

Waiting for your reply.

(in reply to kya_karey)
 
 
Post #: 5
 
 Re: Open Save Digaloge box in VB Script - 5/25/2005 8:09:48 PM   
  Zifter


Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
Nothing wrong with the syntax of that script.
It will create a file on the C-drive with the name "Newtemplate" and because it has the extension "xml" it will be recognised as a XML file. Then the current date will be written to this file.
This works, I tested it.
Although nothing is wrong with this syntax, you are creating a XML file with only a date written to it. This is not a valid XML file.
Consider this example:
      HTH

(in reply to kya_karey)
 
 
Post #: 6
 
 Re: Open Save Digaloge box in VB Script - 5/25/2005 8:48:23 PM   
  kya_karey

 

Posts: 39
Score: 0
Joined: 5/11/2005
From: India
Status: offline
Aey !!!!!!! Thanks man

i didnt notice this.

Thanks you so much

(in reply to kya_karey)
 
 
Post #: 7
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Open Save Digaloge box in VB Script Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts