+ Reply to Thread
Results 1 to 3 of 3

VB File Save

  1. #1
    John A
    Guest

    VB File Save

    I have an Excel 97 workbook that produces a sheet of cheque-print
    data. I have a VB macro that reads data from a text file from another
    application into the workbook, and another VB Macro that saves data on
    this sheet to a comma-delimited text file (for input to Word for
    cheque printing).

    I currently have the file paths for the text files hard-coded into the
    VB macro.

    I would like to be able to select the paths from a standard Windows
    File Open and File Save box, but the only option I can find is to
    enter the path in an InputBox, which is not very good.

    Can this be done?

    Thanks

    John Allen

  2. #2
    IC
    Guest

    Re: VB File Save

    This copied directly from Excel help (GetSaveAsFilename Method)

    fileSaveName = Application.GetSaveAsFilename( _
    fileFilter:="Text Files (*.txt), *.txt")
    If fileSaveName <> False Then
    MsgBox "Save as " & fileSaveName
    End If

    Ian

    "John A" <[email protected]> wrote in message
    news:[email protected]...
    >I have an Excel 97 workbook that produces a sheet of cheque-print
    > data. I have a VB macro that reads data from a text file from another
    > application into the workbook, and another VB Macro that saves data on
    > this sheet to a comma-delimited text file (for input to Word for
    > cheque printing).
    >
    > I currently have the file paths for the text files hard-coded into the
    > VB macro.
    >
    > I would like to be able to select the paths from a standard Windows
    > File Open and File Save box, but the only option I can find is to
    > enter the path in an InputBox, which is not very good.
    >
    > Can this be done?
    >
    > Thanks
    >
    > John Allen




  3. #3
    John A
    Guest

    Re: VB File Save

    Ian

    Thanks for your help

    My Excel97 VB help doesn't work

    On Sat, 05 Feb 2005 20:06:36 GMT, "IC" <[email protected]> wrote:

    >This copied directly from Excel help (GetSaveAsFilename Method)
    >
    >fileSaveName = Application.GetSaveAsFilename( _
    > fileFilter:="Text Files (*.txt), *.txt")
    >If fileSaveName <> False Then
    > MsgBox "Save as " & fileSaveName
    >End If
    >
    >Ian
    >
    >"John A" <[email protected]> wrote in message
    >news:[email protected]...
    >>I have an Excel 97 workbook that produces a sheet of cheque-print
    >> data. I have a VB macro that reads data from a text file from another
    >> application into the workbook, and another VB Macro that saves data on
    >> this sheet to a comma-delimited text file (for input to Word for
    >> cheque printing).
    >>
    >> I currently have the file paths for the text files hard-coded into the
    >> VB macro.
    >>
    >> I would like to be able to select the paths from a standard Windows
    >> File Open and File Save box, but the only option I can find is to
    >> enter the path in an InputBox, which is not very good.
    >>
    >> Can this be done?
    >>
    >> Thanks
    >>
    >> John Allen

    >



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1