+ Reply to Thread
Results 1 to 8 of 8

Working with Sub function with Excel in background

  1. #1
    Registered User
    Join Date
    02-20-2010
    Location
    Ukraine, Donetsk
    MS-Off Ver
    Excel 2003
    Posts
    19

    Unhappy Working with Sub function with Excel in background

    Hi,

    I have a problem with Excel when it is working in background.
    I'm calling a function from external program. Function is just Excel Sub function.

    Please Login or Register  to view this content.
    When I put some other application in front of Excel window the "CopyRange" doesn't paste the data.

    Is there some option to continue calculation when Excel in background?
    Last edited by sphinx_ps; 03-10-2010 at 06:28 PM.

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

    Re: Working with Sub function with Excel in background

    That's not a valid function signature in VBA, and I don't know what you mean by "background"
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    02-20-2010
    Location
    Ukraine, Donetsk
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Working with Sub function with Excel in background

    Syntax is not so important. The point is that SUB isn't working when...
    For example I have two application Photoshop and Excel. When Photoshop is active Window (currently selected) the SUB isn't pasting records in the sheet. When Excel is active window it works ok.

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

    Re: Working with Sub function with Excel in background

    Syntax is only important if you need the code to work.

    What's calling the sub?

  5. #5
    Registered User
    Join Date
    02-20-2010
    Location
    Ukraine, Donetsk
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Working with Sub function with Excel in background

    I call it from external application (Delphi program) every minute. When Excel is not active window the Sub function doesn't work.

    By the way I have Sub and Functions in my .xla file Functions are working. I really don't understand this issue with Sub.

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

    Re: Working with Sub function with Excel in background

    Does it run? Set a breakpoint.

  7. #7
    Registered User
    Join Date
    02-20-2010
    Location
    Ukraine, Donetsk
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Working with Sub function with Excel in background

    It runs but the data is not being pasted. It is pasted only when Excel is active window. (((

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

    Re: Working with Sub function with Excel in background

    I don't have any way to test, so I have no suggestion, sorry.

+ 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