+ Reply to Thread
Results 1 to 5 of 5

Problem Saving to a specific folder

  1. #1
    Registered User
    Join Date
    12-26-2007
    Posts
    24

    Problem Saving to a specific folder

    Hi,

    I have been trying to save my spreadsheet with date as filename, however, I cannot figure out what is the code to write it to a specific folder. At the moment, it saves the file to 'my documents. Below is my code. One more problem is that this code saves it with a different extension and i would like to save it to .csv thank you.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    12-26-2007
    Posts
    24
    Thanks, that got it working. How do i change the extension of the file ? at the moment it is excel binary. would like it to be .csv

    Thanks

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-05-2012
    Location
    Pottsville, Pa
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Problem Saving to a specific folder

    If I am exporting my file as a PDF automatically based on a "Submit" button, how do I get that file to be saved as input from and input box plus also today's date?

    Here is my code for exporting the file as a pdf into a specific folder

    Sub Export_As_PDF()
    '
    ' Export_As_PDF Macro
    '

    '
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    "G:\MAINT_PM\PV Screw & Barrel Wear Doucments\Line ___ - (00-00-201_).pdf" _
    , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
    :=False, OpenAfterPublish:=False

    End Sub


    where the filename is assigning it Line ___ - (00-00-201_).pdf, I want line to be input from an input box.

    Dim LineInput As Variant
    LineInput = InputBox("What line are these measurements for?")
    <----- Here somehow I need to call the Save As Dialog Box ---->
    Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = LineInput

    and then I would like to add in today's date automatically as the rest of the file name.

    When I look in the folder, my hope is to see 100s of pdf documents file named as "Line xxx (yy-mm-dd)"

+ 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