+ Reply to Thread
Results 1 to 4 of 4

Trying to prevent calculating a temp workbook - Problem with PublishObjects.Publish

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    15

    Trying to prevent calculating a temp workbook - Problem with PublishObjects.Publish

    Good afternoon,

    I have a very clever function (below), created by Ron de Bruin, that copies tables into emails. This is great for daily reporting! However, it has a quirk where right as the .Publish (True) command executes it starts to calculate the temp workbook that was created to store the table. If I push escape and tell it to save without calculating, no problem, it goes on the create the email correctly. But if I don't manually do this it adds minutes onto the run time of the macro, very annoying! Particularly because I have multiple tables.

    Application.Calculation =xlManual does not seem to have any effect. Any thoughts? Thank you for your help!

    Please Login or Register  to view this content.
    Last edited by MacGyver7640; 03-20-2013 at 03:35 PM. Reason: wrong url

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Trying to prevent calculating a temp workbook - Problem with PublishObjects.Publish

    Maybe set the EnableCalculation property for the worksheet to false.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-12-2012
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Trying to prevent calculating a temp workbook - Problem with PublishObjects.Publish

    shg! That worked!

    Revised code is below. I'll shoot an email over to Ron too. Thanks so much!

    Please Login or Register  to view this content.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Trying to prevent calculating a temp workbook - Problem with PublishObjects.Publish

    That's not what I suggested, but if it works, fine -- though you probably want to set calculation back to automatic before exiting.

+ 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