Excel background

Discussion in 'Trading Software' started by GATrader, Jul 2, 2006.

  1. Hi. I have 3-4 apps in my pc running concurrently. An execution platform, a charting system, Excel and Email. I have a VB6 program that writes stuff to Excel every 2 minutes or so. The issue is that whenever it fires, Excel captures the "focus" so if my cursor is in a chart or worse yet an order ticket waiting for me to fire off an order, it goes to Excel which is extremely annoying. Other than running the VB 6/Excel app in a separate machine, is there a way for it to run in the background. Here is a code snippet from my VB 6 code. Thanks.

    Set XL = GetObject("C:\XLWorkbooks\IVolSDK.xls")
    XL.Application.Visible = True
    XL.Application.Windows("IVolSDK").Visible = True
    XL.Application.WindowState = xlNormal

    XL.Application.Cells(5,7) = "insert value here"
  2. Try surrounding your code with...

    XL.Application.Interactive = False
    XL.Application.Interactive = True

    Let me know if that works. I've done quite a bit of automation code.

    As an aside, a quick and dirty "fix" might be hiding the application.