Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    May 2001
    Location
    New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Save with Visual Basic (97)

    I am using Excel 97. I made a popular workbook a template so that it will save certain contents to Access. On this workbook, I have a macro that will print it and then clear it.
    Bottom line is that I want to be able to save the info, print it then clear the contents.

    Any ideas?

    Thanks,
    Mark

    PS. I hope that I expalined it ok.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save with Visual Basic (97)

    Is ActiveWorkbook.SaveAs what you are looking for?
    Legare Coleman

  3. #3
    Star Lounger
    Join Date
    May 2001
    Location
    New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save with Visual Basic (97)

    I guess that I have to learn more about saving the information to an Access database.
    At what point does the information get sent and saved?
    Could I automate this task with a macro?
    Then I could add it to the macro that print and resets the worksheet.

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save with Visual Basic (97)

    OOPS. I didn't read your question closely enough. I missed the Access. I just thought you wanted to save the workbook. I am not an Access person, so hopefully someone else will jump in with an answer for you.
    Legare Coleman

  5. #5
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Save with Visual Basic (97)

    I don't think Excel can save a file as an Access database file. The best way to get the data to access might be to save as a CSV file, or an other delimited text file format, and then import into Access. You can with a bit of planning have Access import an Excel file, but the procedure is pretty much the same as importing a text file.

    Do you need to clear the contents, as it is a template. Just close the file and then use File ,New and choose your custom template , and you should have a fresh copy.

    Andrew C

  6. #6
    Star Lounger
    Join Date
    May 2001
    Location
    New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save with Visual Basic (97)

    Backing up.
    This workbook is how our company quotes jobs. We want to save this info so that we can do analysis later.

    I saw in the Excel help that you can create a template that copies worksheet data to a database. I set up the template and linked the fields in the worksheet to the Access database.

    My problem is that we will do multiple quotes at a time (one after another) and I need to be able to send the data to the database when we are done with a quote, like when the quote is printed. When does the info get sent to the database?
    If the saving is done when it closes, then is there a way to send the data to the database with a macro?

Posting Permissions

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