Saving files in Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cloh
    New Member
    • Jul 2007
    • 41

    Saving files in Access

    I am using Access to write the VB code that generates a graph in Excel. I ask for the user to input the path and file name that they want. How would I go about saving the file using those two pieces of information? Thanks!
  • MikeTheBike
    Recognized Expert Contributor
    • Jun 2007
    • 640

    #2
    Hi

    Originally posted by cloh
    I am using Access to write the VB code that generates a graph in Excel. I ask for the user to input the path and file name that they want. How would I go about saving the file using those two pieces of information? Thanks!
    Assuming you are using automation to run excel code, then something like this

    Code:
    File = YourPath & "\"  YourFile 
    
    ActiveWorkbook.SaveAs FileName:=FileName
    or

    Workbooks("Work bookName").Save


    The best way to find out this and any other excel code is to use the macro recorder in excel.

    ??


    MTB

    Comment

    Working...