+ Reply to Thread
Results 1 to 2 of 2

Print to file .xls macro does not work

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    20

    Exclamation Print to file .xls macro does not work

    Here is a macro that I recorded to print a file to a .xls file. two problems with my excel's recorded macro. One is that when I saved everything closed my document and reopened it, I ran the macro and it printed to my default printer. I want it to print to and .xls file. Also I want to to print to an .xls file that is in a specific location based off two different cell values. And be named off of a specific cell value with the date added.

    Here is the code that excel recored. Any help would be much aprreciated!!!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Print to file .xls macro does not work

    Hi, mgalterio,

    coud you be please be kind enough to explain why you want to print a workbook instead of saving as an Excel file? I would expect SaveAs to be the command you are looking for:
    Please Login or Register  to view this content.
    Code needs to be adjusted as it will rely on the active sheet and may not suit what you are looking for as well as the fileformat which is the old format for Excel97-2003.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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