+ Reply to Thread
Results 1 to 5 of 5

Event when Excel window is activated

  1. #1
    Registered User
    Join Date
    06-07-2010
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010
    Posts
    44

    Event when Excel window is activated

    I'm trying to copy data from one program to excel. To save time I want excel to do all the pasting for me.

    So, I have one excel workbook open and MS Dynamic NAV open.

    I copy the data from NAV and then when I switch to the excel workbook I want it to paste the data in itself.

    I've written the code to paste the data in. That works fine, however I can't get this code to fire when I activate or switch to the excel window. I've tried the following but it won't work

    Please Login or Register  to view this content.
    And the following as well,

    Please Login or Register  to view this content.
    Any thoughts?

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: Event when Excel window is activated

    There is no event for that, I'm afraid. Excel's events only relate to things that happen within the application.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Event when Excel window is activated

    maybe the rezize event
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    06-07-2010
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Event when Excel window is activated

    But am I not activating the application or workbook or something like that....

    Please Login or Register  to view this content.
    Would this work? Don't really know where to put it....

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: Event when Excel window is activated

    No - that will only fire when you switch between workbooks in Excel.

+ 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