Save process through commondialog

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhijeetroy
    New Member
    • Aug 2007
    • 3

    #1

    Save process through commondialog

    Can anybody help me to save a particular file from one system to another system through commondialog in vb6

    Thanks

    Abhijeet
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    it is :

    [code=vb]
    CommonDialog1.S howSave
    [/code]

    If any error occurs, then "Err" object is populated with number and description, u will have to take care of that.

    REgards
    Veena

    Comment

    • Robbie
      New Member
      • Mar 2007
      • 180

      #3
      After that, CommonDialog1.F ileName will contain the filename which the user wants to save the file as.

      It depends on your program how exactly you use this. For example, for saving some text to this file, you'd use:
      Dim FileID As Integer
      FileID = FreeFile
      Open CommonDialog1.F ilename For Output As FileID
      (Write some stuff to it here)
      Close FileID


      If you simply wanted to make a copy of one file as this new filename, you'd use
      FileCopy OrigFilename, CommonDialog1.F ilename

      Comment

      Working...