Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    Charlottetown, Prince Edward Island, Canada
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    running an EXCEL macro in the background!

    i have an excel spreadsheet that contains a macro that runs when the spreadsheet is opened. is there a way that this can be run without actually seeing it run on the screen. can it run behind the scenes or execute without interfering with current screen?

    thanks

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: running an EXCEL macro in the background!

    Hi,
    If you want it to run without your screen flickering, changing etc. you can add Application.Screenupdating = False to the start of it and Application.Screenupdating = True to the end.
    However, if you want it to run without interfering with you working that's a little tricky. Adding a DoEvents line if you have a loop in your code might work (depending on your system) but if it just runs through a long procedure once your only option is to try and optimize the speed of your code.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Star Lounger
    Join Date
    Jan 2001
    Location
    Charlottetown, Prince Edward Island, Canada
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: running an EXCEL macro in the background!

    Rory,

    that worked great. Excel opened up and then it was done and exited. thanks for your help again.

    mike

Posting Permissions

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