+ Reply to Thread
Results 1 to 4 of 4

Outlook Macro Fails to run Excel macro with Visibility = False

  1. #1
    Registered User
    Join Date
    03-29-2011
    Location
    Easton, PA
    MS-Off Ver
    2010
    Posts
    2

    Outlook Macro Fails to run Excel macro with Visibility = False

    I'm trying to run an Outlook macro that automatically emails a pdf. The Outlooks macro also launches an Excel macro which run a report and creates a pdf. However, the Outlook macro fails when objExcel.Visibility=False but works fine when objExcel.Visibility=True. Maybe someone can help with what is goining on here as to run with Visibility=True is very annoying.

    Please Login or Register  to view this content.
    Last edited by Fotis1991; 01-11-2014 at 05:17 PM. Reason: pls use code tags around your codes as per forum rules.

  2. #2
    Registered User
    Join Date
    12-03-2013
    Location
    Mestreech, Limburg
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Outlook Macro Fails to run Excel macro with Visibility = False

    Adding
    Please Login or Register  to view this content.
    at the beginning of the Sub freezes the screen but your macro will still be running.
    Remember to set screen updating to True at the end of the Sub.

    Please Login or Register  to view this content.
    Using Excel 2003

  3. #3
    Registered User
    Join Date
    03-29-2011
    Location
    Easton, PA
    MS-Off Ver
    2010
    Posts
    2

    Re: Outlook Macro Fails to run Excel macro with Visibility = False

    I’m a novice at VB coding but I could not find ScreenUpdating in the Outlook object library (this is an Outlook macro that runs an Excel macro) - any other thoughts? Here’s the code again. I rearranged it some to make it easier to follow. The code runs as below but changing objExcel.Visibility = False, it crashes at objExcel.Run ("RunReport").

    Please Login or Register  to view this content.
    Last edited by rvdurham; 01-13-2014 at 02:19 PM.

  4. #4
    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: Outlook Macro Fails to run Excel macro with Visibility = False

    Hi, rvdurham,

    Fotis1991 has added code-tags to your opening post for you to comply with the Forum Rules but you should do it for your last post by yourself:


    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    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)

Similar Threads

  1. [SOLVED] VBA Macro to print to Pdf format and place as attachment in Outlook (Excel & Outlook 2007)
    By Webman1012 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2013, 01:25 PM
  2. [SOLVED] Displey true or false depending on row visibility
    By Jongering in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-20-2013, 12:47 AM
  3. Label is visible before enabling macro even though its visibility was set to false.
    By Sangram Bhosale in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-16-2012, 07:43 AM
  4. [SOLVED] Checkbox visibility setting fails
    By onyxnz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2011, 12:12 AM
  5. [SOLVED] Find/Replace functions VERY slow when visibility = false
    By erickras in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2006, 02:30 AM

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