Skip to Content
0

OLE fill excel in background while user is working on another different workbook=>lost focus

Jul 20, 2017 at 01:45 PM

52

avatar image
Former Member

Hello,

i allready fill my own worbook in Background

      SET PROPERTY OF go_excel 'DisplayAlerts' = 0
      SET PROPERTY OF go_excel   'Visible'   = 0. 
      CALL METHOD OF go_excel 'Workbooks' = go_workbook. 
      SET PROPERTY OF go_excel 'SheetsInNewWorkbook' = 1. 
      CALL METHOD OF go_workbook 'Add' = go_worksheet.  
      GET PROPERTY OF go_excel 'ActiveSheet' = go_worksheet.  
      SET PROPERTY OF go_worksheet 'Name' = 'test1'. 
      GET PROPERTY OF go_excel 'ActiveSheet' = go_worksheet. 
etc. fill cell...

Everything works fine...

But

When the User starts interactive any different Excel-Workbook my programm will lost the focus to put data in the background sheet. Even if i put for every comment

CALL METHOD OF go_sheet 'Activate'

the user can gets at this millisecond the focus by klicking the mouse on the interactive sheet.


Now my question...
does someone know how to implement the comment ".with... end with" (VBA) in abap so i can assign the workbook? or is there another solution for my problem??

thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers