Excel Macro screen update

Hello,
I'm using  the above  approach to connect to SAP in order to upload data from excel to SAP R/3  transaction.
Myquestions is there exist  away to prevent the screen flickering from EXCEL to SAP during the macro processing , tried to the statement at the excel macro :   Application.ScreenUpdating =FALSE  which didn't  worked.
In other words my requirement is not see SAP screen at all during the macro processing.
If Not IsObject(SAPguiApp) Then
    Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")
End If
If Not IsObject(Connection) Then
    Set Connection = SAPguiApp.OpenConnection("SYSTEM", True)
End If
If Not IsObject(Session) Then
    Set Session = Connection.Children(0)
End If
Session.findById("wnd[0]/usr/txtRSYST-MANDT").Text = "CLIENT"
Session.findById("wnd[0]/usr/txtRSYST-BNAME").Text = "USER"
Session.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = "PASSWORD"
Session.findById("wnd[0]/usr/txtRSYST-LANGU").Text = "EN"
Session.findById("wnd[0]/usr/txtRSYST-LANGU").SetFocus
Session.findById("wnd[0]/usr/txtRSYST-LANGU").caretPosition = 2
Session.findById("wnd[0]").sendVKey 0
'Here follows the recorded VBScript . . .
Regards,
Mark

Hi Mark, welcome to the forum.
I'd test it with session.findById("wnd [0]"). iconify.
And I would eliminate the command session.findById("wnd [0]").maximize.
Regards,
ScriptMan

Similar Messages

  • Help needed - Excel macro error after Reader 11 update.

    I wrote the following section of an Excel 2010 macro to open a selected pdf file with Adobe Reader, then copy all text to the clipboard & then return to Excel to paste &
    process the data. The macro works with Adobe Reader 10.  After I updated to Adobe Reader 11, Reader 11 will open but I get an error message of file not found. I've gone back &
    forth between Reader 10 & 11 from clean installs & the problem stays with 11. The only thing I changed in the macro is the path for where Abobe Reader is located. The only
    Adobe Reader preferences I change from the clean install setup is I set the Default View to Single Page continuous.  Any help would be appreciated.
    'Get the data file (pdf) to open
    fileToOpen = Application.GetOpenFilename("PDF Files (*.pdf), *.pdf")
    If fileToOpen = False Then Exit Sub
    Application.Wait Now + TimeSerial(0, 0, 1)
    'Filepath for Adobe Reader 10 program for Windows 64bit systems
    MyPath = "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe"
    'Open PDF file with Adobe Reader
    Shell MyPath & " " & fileToOpen, vbNormalFocus
    'Wait for Adobe to Open file
    Application.Wait Now + TimeSerial(0, 0, 5)
    'Select all text [Ctrl-a](Adobe Reader set for Single Page Continuous)
    SendKeys ("^a")
    'Copy selected text [Ctrl-c]
    SendKeys ("^c")
    Application.Wait Now + TimeSerial(0, 0, 2)
    'Turn off screen updating
    Application.ScreenUpdating = False
    Here's the only difference in the macro for Adobe Reader 11
    'Filepath for Adobe Reader 11 program for Windows 64bit systems
    MyPath = "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"

    Hi,
    I do not see any reason for this to not work.
    Is there any difference between the preferences for RX and RXI. Please go to "edit" -> "Preferences" -> "Security(Enhanced)" and uncheck "Enable protected mode at startup".
    Are you able to open any pdf from command line with the same command:
    "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"  <<PDF_FILE>>
    Thanks,
    Amish.

  • ScreenUpdating=False fails to prevent screen updating, and causes bizarre behaviour

    I have recently installed Office 2013 (MSO Standard 2013) on my (Win 7 Professional) computer.  During a brief transitional period, Office 2003 will remain on my computer.
    I had been looking forward to running the many Excel VBA applications on Excel 2013, but am not only disappointed, but alarmed.  We are significantly dependent on over 50 business applications running in Excel VBA (many of which are complex,
    and many of which I have developed), but we now find that seemingly one difference alone (though we may yet discover more) is rendering many of them virtually unusable.  That difference is the behaviour of the Application.ScreenUpdating method.
    In Excel 2003, the ScreenUpdating method behaved intuitively, predictably and reliably.  It basically does what it says - all screen updating, except for the status bar, is frozen.  To allow users to peek at any updates, one would simply
    set ScreenUpdating=True and at the appropriate point freeze updating with ScreenUpdating=False.  Now, in Excel 2013, we are instead finding behaviour which has to be described as bizarre, counterintuitive and destructive.  Essentially, what is happening
    is that whenever another worksheet is activated, ScreenUpdating=False does not prevent screen updating - and for good measure, there are a number of other unpleasant side-effects.  I have spent many long hours searching through hundreds of forum posts
    and testing workarounds - all without success.  I have seen many posts complaining about ScreenUpdating in Excel 2013, but not a single implementable solution.  Yes, I've seen the advice about replacing Select or Activate methods with objects, but
    this workaround would not only be extremely costly and impractical in our case (it would require reworking tens of thousands of lines of code and would probably take many person months of unjustifiable work), it almost certainly wouldn't work.  (You'll
    have to take my word on that.)  And all because ScreenUpdating=False doesn't really prevent screen updating any more!  I cannot accept that ScreenUpdating is working properly in Excel 2013, nor that its functionality is in any way acceptable.
    The problems are best illustrated with a simple example.  I created this example to verify that the flickering was unrelated to the complexity of the business applications I referred to above.  In this example, there is a "master"
    workbook named "ScreenUpdatingTest.xls".  This contains a single button on its only worksheet, and this button executes macro "TestScreenUpdating".  This macro turns screen updating off, then sequentially opens workbook AAA.xls,
    workbook BBB.xls and workbook CCC.xls with a 3 second interval between each workbook being opened.  After 3 more seconds, it activates workbook ScreenUpdatingTest.xls and then turns screen updating on.  Along the way, it reports these actions in
    the status bar.  One would expect that this would result in AAA, BBB and CCC being opened in the background, with the user seeing no changes on the screen apart from the status bar and the workbooks appearing in the task bar.  This is precisely what
    happens in Excel 2003.
    By contrast, Excel 2013 seems to do absolutely nothing for about 12 seconds (even the task bar and the status bar remains unchanged), then, AAA, BBB and CCC can be seen to open (in maximized windows) in rapid succession.  The only message I see in the
    status bar is the last one, "Switched back to ScreenUpdatingTest.xls."  Even more bizarrely, that there is a call to Msgbox "Hi" just before the Application.ScreenUpdating=True at the end of the subroutine - and this should be unrelated
    to which workbook the focus end up with, right?  Wrong!  If Msgbox "Hi" is commented out, the focus ends up with CCC.xls - in other words, Workbooks(ThisWorkbook.Name).Activate seems to be ignored.  But if Msgbox "Hi" is
    uncommented, the focus ends up with ScreenUpdatingTest.xls!  This is crazy, isn't it?
    Sub TestScreenUpdating()
    Application.ScreenUpdating = False
    Application.Wait Now() + TimeValue("00:00:03")
    Workbooks.Open ThisWorkbook.Path & "\AAA.xls"
    Windows("AAA.xls").Activate
    Application.StatusBar = "AAA.xls has been opened."
    'Excel 2003:
    ' I see workbook ScreenUpdatingTest.xls on the screen with no flickering.
    ' AAA.xls is open in the task bar.
    ' The message that AAA.xls has been opened appears in the status bar.
    'Excel 2013:
    ' I see workbook ScreenUpdatingTest.xls on the screen with no flickering.
    ' AAA.xls is >>>NOT<<< open in the task bar
    ' >>>NO<<< message that AAA.xls has been opened appears in the status bar.
    Application.Wait Now() + TimeValue("00:00:03")
    Workbooks.Open ThisWorkbook.Path & "\BBB.xls"
    Windows("BBB.xls").Activate
    Application.StatusBar = "BBB.xls has been opened."
    'Excel 2003:
    ' I see workbook ScreenUpdatingTest.xls on the screen with no flickering.
    ' AAA.xls and BBB.xls are open in the task bar.
    ' The message that BBB.xls has been opened appears in the status bar.
    'Excel 2013:
    ' I see workbook ScreenUpdatingTest.xls on the screen with no flickering.
    ' AAA.xls and BBB.xls are >>>NOT<<< open in the task bar.
    ' >>>NO<<< message that BBB.xls has been opened appears in the status bar.
    Application.Wait Now() + TimeValue("00:00:03")
    Workbooks.Open ThisWorkbook.Path & "\CCC.xls"
    Windows("CCC.xls").Activate
    Application.StatusBar = "CCC.xls has been opened."
    'Excel 2003:
    ' I see workbook ScreenUpdatingTest.xls on the screen with no flickering.
    ' AAA.xls, BBB.xls and CCC.xls are open in the task bar.
    ' The message that CCC.xls has been opened appears in the status bar.
    'Excel 2013:
    ' I see workbook ScreenUpdatingTest.xls on the screen with no flickering.
    ' AAA.xls, BBB.xls and CCC.xls are >>>NOT<<< open in the task bar.
    ' >>>NO<<< message that CCC.xls has been opened appears in the status bar.
    Application.Wait Now() + TimeValue("00:00:03")
    Workbooks(ThisWorkbook.Name).Activate
    Application.StatusBar = "Switched back to ScreenUpdatingTest.xls."
    MsgBox "Hi"
    Application.ScreenUpdating = True
    'Excel 2003:
    ' I see workbook ScreenUpdatingTest.xls on the screen with no flickering.
    ' AAA.xls, BBB.xls and CCC.xls are open in the task bar.
    ' The message that we have switched back to ScreenUpdatingTest.xls appears in the status bar.
    'Excel 2013:
    ' Workbooks AAA.xls, BBB.xls and CCC.xls appear in rapid succession.
    ' When execution ends:
    ' If Msgbox "Hi" is commented out, the focus is with CCC.xls.
    ' If Msgbox "Hi" is uncommented, the focus is with ScreenUpdatingTest.xls.
    ' AAA.xls, BBB.xls and CCC.xls are >>>NOT<<< open in the task bar.
    ' The message that we have switched back to ScreenUpdatingTest.xls appears in the status bar.
    End Sub
    Surely it is reasonable to expect that such functionality should remain consistent from one version to the next!  Our applications in Excel 2003 had a professional, elegant user interface, and they behaved predictably, intuitively and robustly. 
    With Excel 2013, this is utterly trashed, with flickering, unpredictable behaviour (who knows what will get the focus?) and inefficiency (things are so much slower when the screen updates).  With Office 2003 going out of support, vast numbers of people
    in my company will be moving to Excel 2013 as Excel 2003 is decommissioned.  I imagine the same will be happening in many other companies.  We now find ourselves on the cusp of being dealt us a devastating blow due to ONE DYSFUNCTIONAL METHOD, and
    we are desperate for a solution.  A solution would either have to restore the former Excel 2003 functionality of ScreenUpdating, or it would have to introduce a new method which really does turn screen updating on or off without exception.
    Please, HELP!
    -Peter

    Thanks for the input, Jim.
    I don't think the Single Document Interface is contributing to the problem.  Since installing Office 2013, Excel 2003 has also inherited a Single Document Interface - yet while it behaves like a charm, Excel 2013 behaves ineptly.
    Whatever the reasons for the problem, the fact is that this functionality is now broken - one might even say catastrophically broken - and some sort of resolution is essential.  It would be madness to allow something like this to have such a severe
    impact on business operations.
    My call for help is still out there, as loud as ever!  BTW, I can send my example files, zipped, to anyone who might like to look at them.
    Peter
    Sydney, Australia

  • Execute Infopackage Through BAPI Using Excel Macro (BAPI_IPAK_START)

    Hi everyone,
    I have a problem when execute infopackage through BAPI using excel macro. I have create a button in macro. When this button is clicked, BAPI for trigger InfoPackage will executed (BAPI_IPAK_START) and this button will disabled.
    After this process completely done (traffic indicator for the request is green in update rules), the button will enabled again.
    Here the subroutine or pseudocode that i will write :
    Private Sub ClickButton()
    Begin
    1. ThisButton.Activated = False   --> Disabled Button
    2. Call BAPI/custom Function Module to execute InfoPackage (BAPI_IPAK_START)
    4. ThisButton.Activated = True   --> Enabled Button
    End
    The problem is i need some statement like this between statement no 2 and statement no 4
    Statement That I Want :
    3. Wait Until BAPI Execute Completely
    So user can click this button again only after the process is finished completely. I don't know how to do this in macro (in ABAP i know i can use "WAIT ... SECOND"), others said this can be done using event in schedule option at infopackage. Anyone,please help me.
    Thank you.
    Regards,
    Satria B

    Enter that req number in RSRQ and monitor the load
    or  right click on the DS - manage - you will req in yellow status which is in progress and you can click on the ...takes you monitor screen
    Edited by: Srinivas on Jul 6, 2010 7:51 AM

  • How do I make an Excel macro and Labview push to copy Labview calculated data into a cell on demand?

    Hey there, I am a chemist so Labview and programming aren't exactly my strong point. 
    We have a Labview program that we run to control and automated valve manifold that has a thermocouple and pressure transducer that displays the temperature and pressure on the "front panel" of the labview file we run.  The temperature and pressure of the manifold changes in real time while the labview is running.  We must attach a sample to the manifold, take the pressure and temperature, then record those values in an excel spread sheet, one at a time.
    What I would like to do is make a key board macro in excel to automatically type in the current read out of the temperature (and another for pressure) into which ever selected excel cell you are on, so that you don't have to switch back to the labview window to look at it.  I have a very basic understanding of macros in VB but I don't know how to get the labview to make the read outs available for the excel macros to find it.
    Thanks for the help, Here is a screen shot of the block layout of the program.
    Attachments:
    back.JPG ‏79 KB

    Why not have LV put the data in Excel for you?  You can use Actvie X to do this.  There is plenty of information on the forum and knowledge base on how to use Active X and reporting to Excel.  Plus you have the example finder.  Do you have the Report Generation Toolkit?  LV7 is quite old, so I don't know if this is an option for you.
    Reese, (former CLAD, future CLD)
    Some people call me the Space Cowboy!
    Some call me the gangster of love.
    Some people call me MoReese!
    ...I'm right here baby, right here, right here, right here at home

  • How to run excel macro from ole

    hi to all experts.
    i need to run excel macro from ole

    Hi,
    *& Report  ZKC_TEST
    *& Description: Fancy report output in XL
    *&Programmer: Krishna Chauhan
    *&Date:       20 Feb 09
    REPORT  ZKC_TEST.
    * INCLUDES                                            *
    INCLUDE ole2incl.
    *&   TYPES                                            *
    TYPES: BEGIN OF ty_marc,
           matnr TYPE marc-matnr,
           werks TYPE marc-werks,
           pstat TYPE marc-pstat,
           lvorm TYPE marc-lvorm,
           ekgrp TYPE marc-ekgrp,
           END OF ty_marc.
    TYPES: BEGIN OF ty_titles,
           title(20) TYPE c,
           field(20) TYPE c,
           END OF ty_titles.
    *&   INTERNAL TABLES                                  *
    DATA: t_marc TYPE STANDARD TABLE OF ty_marc,
          t_titles TYPE STANDARD TABLE OF ty_titles.
    *&   FIELD-SYMBOLS                                    *
    FIELD-SYMBOLS: <fs_marc>   LIKE LINE OF t_marc,
                   <fs_titles> LIKE LINE OF t_titles,
                   <fs> TYPE ANY.
    *&   VARIABLES                                        *
    DATA: w_tabix TYPE sy-tabix,
          w_titles TYPE sy-tabix,
          w_line TYPE sy-tabix,
          w_field TYPE string,
          filename TYPE string,
          path TYPE string,
          fullpath TYPE string.
    DATA: data_titles TYPE REF TO data.
    DATA: e_sheet TYPE ole2_object,
          e_activesheet TYPE ole2_object,
          e_newsheet TYPE ole2_object,
          e_appl TYPE ole2_object,
          e_work TYPE ole2_object,
          e_cell TYPE ole2_object,
          e_color TYPE ole2_object,
          e_bold TYPE ole2_object.
    *&   SELECTION-SCREEN                                 *
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    PARAMETERS: p_file TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK b1.
    *&  START-OF-SELECTION                                *
    START-OF-SELECTION.
      PERFORM get_titles.
      PERFORM get_data.
      PERFORM create_excel.
    *& AT SELECTION-SCREEN                                *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        EXPORTING
          window_title      = 'Select archivo'
          default_extension = 'xls'
          file_filter       = '*.xls'
        CHANGING
          filename          = filename
          path              = path
          fullpath          = fullpath.
      IF sy-subrc EQ 0.
        p_file = fullpath.
      ENDIF.
    *&      Form  get_titles                              *
    FORM get_titles.
      CREATE DATA data_titles TYPE ty_titles.
      ASSIGN data_titles->* TO <fs_titles>.
      <fs_titles>-title = 'Material'.
      <fs_titles>-field = 'MATNR'.
      APPEND <fs_titles> TO t_titles.
      <fs_titles>-title = 'Plant'.
      <fs_titles>-field = 'WERKS'.
      APPEND <fs_titles> TO t_titles.
      <fs_titles>-title = 'PSTAT'.
      <fs_titles>-field = 'PSTAT'.
      APPEND <fs_titles> TO t_titles.
      <fs_titles>-title = 'Deletion Flag'.
      <fs_titles>-field = 'LVORM'.
      APPEND <fs_titles> TO t_titles.
      <fs_titles>-title = 'EKGRP'.
      <fs_titles>-field = 'EKGRP'.
      APPEND <fs_titles> TO t_titles.
    ENDFORM.                    "get_titles
    *&      Form  get_data                                *
    FORM get_data.
      SELECT matnr werks pstat lvorm ekgrp
      INTO TABLE t_marc
      FROM marc
      WHERE matnr = '000000000001013351'.
    ENDFORM.                    " get_data
    *&      Form  create_excel                            *
    FORM create_excel.
      w_line = 1.
      CREATE OBJECT e_appl 'EXCEL.APPLICATION'.
      SET PROPERTY OF e_appl 'VISIBLE' = 1.
      CALL METHOD OF e_appl 'WORKBOOKS' = e_work.
      CALL METHOD OF e_work 'Add' = e_work.
      GET PROPERTY OF e_appl 'ActiveSheet' = e_activesheet.
      SET PROPERTY OF e_activesheet 'Name' = 'Material Plants'.
      LOOP AT t_marc ASSIGNING <fs_marc>.
        w_tabix = sy-tabix.
        w_line = w_line + 1.
        LOOP AT t_titles ASSIGNING <fs_titles>.
          w_titles = sy-tabix.
          CALL METHOD OF e_appl 'Cells' = e_cell
            EXPORTING
              #1 = 1
              #2 = w_titles.
          SET PROPERTY OF e_cell 'Value' =  <fs_titles>-title.
          GET PROPERTY OF e_cell 'Interior' = e_color.
          SET PROPERTY OF e_color 'ColorIndex' = 35.
          GET PROPERTY OF e_cell 'Font' = e_bold.
          SET PROPERTY OF e_bold 'Bold' = 1.
          CALL METHOD OF e_appl 'Cells' = e_cell
            EXPORTING
              #1 = w_line
              #2 = w_titles.
          CONCATENATE '<fs_marc>-' <fs_titles>-field
          INTO w_field.
          ASSIGN (w_field) TO <fs>.
          SET PROPERTY OF e_cell 'Value' = <fs>.
          GET PROPERTY OF e_cell 'Interior' = e_color.
          SET PROPERTY OF e_cell 'ColumnWidth' = 20.
          SET PROPERTY OF e_color 'ColorIndex' = 0.
          GET PROPERTY OF e_cell 'Font' = e_bold.
          SET PROPERTY OF e_bold 'Bold' = 0.
        ENDLOOP.
      ENDLOOP.
      CALL METHOD OF e_work 'SAVEAS'
        EXPORTING
          #1 = p_file.
      CALL METHOD OF e_work 'close'.
      CALL METHOD OF e_appl 'QUIT'.
      FREE OBJECT e_appl.
    ENDFORM.                    " create_excel

  • LMSW or Excel macro...that is the question

    Hi all,
    I've written an interface that uploads planned independent requirements from a spreadsheet...couldn't have done it without the assistance of this forum of course...thank you!!! Now I've been handed a spreadsheet from a legacy system that contains requirements data. I've been asked to convert this existing spredsheet to the new format so the data can be loaded via my program. So I'm struggling with the idea of creating an Excel macro to convert the legacy file to the new format or use LSMW to perform the data load directly. I know nothing about LSMW. also, I had to create a custom BAPI from the SAP provided version to meet all of the functional requirements. Can someone give me some advice on how to best proceed?
    regards,
    Mat

    Hi Mathew,
    Since u have already written a interface to update the PIR data guess you can use the same program to upload the data from the legacy spreadsheet and massage the data in the custom program itself and bring the data into a format which ur current program can accept. Since u already have a program just using them would make life more easy.
    Cheers
    VJ

  • Running Excel macros from ABAP

    Hello everyone,
    I am trying to execute an Excel macro from an ABAP program.  We are currently on a 46C system.  While doing some research on help.sap.com I came across the method execute_macro in class i_oi_document_proxy.  I’ve never used methods in ABAP before and I’m not really sure what I’m doing.  Has anyone got this to work?  When I try to run the program it dumps with error OBJECTS_OBJREF_NOT_ASSIGNED.
    Thanks,
    Becky
    Here is the program:
    REPORT ztest_program.
    INCLUDE ole2incl.
    DATA gs_excel TYPE ole2_object .
    DATA gs_wbooks TYPE ole2_object .
    DATA gs_wbook TYPE ole2_object .
    DATA gs_application TYPE ole2_object .
    DATA: h_sheet TYPE ole2_object.
    DATA: document TYPE REF TO i_oi_document_proxy.
    *Name of the macro in Excel
    DATA: macro_string(50) TYPE c
                     VALUE 'FB03process.FromTheBeginning',
          no_flush TYPE c,
          param_count TYPE i VALUE 0,
          script_name TYPE c VALUE 'X',
          error TYPE REF TO i_oi_error
                OCCURS 0 WITH HEADER LINE,
          retcode TYPE soi_ret_string,
          error_string(50) TYPE c,
          retvalue(30) TYPE c.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
       EXPORTING
             text       = text-007
         EXCEPTIONS
              OTHERS     = 1.
    CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .
    SET PROPERTY OF gs_excel 'Visible' = 1 .
    GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooks .
    GET PROPERTY OF gs_wbooks 'Application' = gs_application .
    *--Opening the existing document
    CALL METHOD OF gs_wbooks 'Open' = gs_wbook
         EXPORTING #1 = 'D:\temp\FB03process.xls' .
    tell user what is going on
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
       EXPORTING
              PERCENTAGE = 0
             text       = text-009
         EXCEPTIONS
              OTHERS     = 1.
    GET PROPERTY OF gs_excel 'ACTIVESHEET' = h_sheet.
    CALL METHOD document->execute_macro
         EXPORTING macro_string  = macro_string
                   param_count   = param_count
                   script_name   = script_name
                   no_flush      = no_flush
         IMPORTING error         = error
                   retcode       = retcode
         CHANGING  error_string  = error_string
                   retvalue      = retvalue.
    disconnect from Excel
    FREE OBJECT gs_excel.
    PERFORM err_hdl.
    FORM err_hdl.
      IF sy-subrc <> 0.
        WRITE: / 'Fehler bei OLE-Automation:'(010), sy-subrc.
        STOP.
      ENDIF.
    ENDFORM.                    " ERR_HDL

    Hi,
    Please correct me if I am wrong but it seems that you have not fetched a handle to the document object before issuing the statement CALL METHOD document->execute_macro. Hence the error OBJECTS_OBJREF_NOT_ASSIGNED is being dislayed. If you want to use SAP Desktop Office Integration using ABAP Objects, take a look at this article at http://www.intelligenterp.com/feature/archive/ or http://www.sapinfo.net/public/en/index.php4/article/comvArticle-193333c63b4bd807d2/en/articleStatistic
    Hope this helps.
    Regards
    Message was edited by: Shehryar Khan

  • How to call excel macros programmatically in C#?

    Hi,
    I have a requirement where i need to call excel (2003) macros in C# program. Can anyone help me with a code snippet to do the same?
    The excel macro function takes two input parameters? how can the parameters be passed?
    Any code snippet to do the same in C# would be helpful.
    Thanks.

    Hey there, Sid.  I am tryin gto run your code, but I couldn't even gte it to fire.  Here's what I ahve now:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Excel = Microsoft.Office.Interop.Excel;
    namespace WindowsFormsApplication2
        public partial class Form1 : Form
            private void button1_Click(object sender, EventArgs e)
                //~~> Define your Excel Objects
                Excel.Application xlApp = new Excel.Application();
                Excel.Workbook xlWorkBook;
                //~~> Start Excel and open the workbook.
                xlWorkBook = xlApp.Workbooks.Open("C:\\Users\\Ryan\\Desktop\\Coding\\Microsoft Excel\\Work Samples\\Work Samples\\Historical Stock Prices.xlsb");
                //~~> Run the macros by supplying the necessary arguments
                xlApp.Run("ShowMsg", "Hello from C# Client", "Demo to run Excel macros from C#");
                //~~> Clean-up: Close the workbook
                xlWorkBook.Close(false);
                //~~> Quit the Excel Application
                xlApp.Quit();
                //~~> Clean Up
                releaseObject(xlApp);
                releaseObject(xlWorkBook);
            //~~> Release the objects
            private void releaseObject(object obj)
                try
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
                    obj = null;
                catch (Exception ex)
                    obj = null;
                finally
                    GC.Collect();
    When I hit the play button nothing happens.  When I hot F5 nothing happens.  Do you ahve any idea what I'm doing wrong.  I'd appreciate any advice with this!! 
    Thanks!!
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • A question about screen updation of T61

    Hi there
    I got a question about screen updation. 
    Currently, my T61's screen is 14.1 XGA TFT 1028x768, and it can't work, thus I am considering to replace it with the better 14.1" SXGA+ LCD SCREEN .
    However, I am a little concerned about the compatiblility problem, hence I just wonder whether the new SXGA+ screen can fit for my current T61 laptop or not?? Thanks a lot for your answers!
    Regards
    Peng

    you can buy it from IBM parts, and it will then sure to work for your laptop.
    Here is the manual that shows you how and what parts you need:
    http://www-307.ibm.com/pc/support/site.wss/MIGR-67979.html
    P.S. If you have warranty this upgrade will void your remaining laptop warranty, as the LCD is not CRU (customer replaceable unit). 
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • Excel macro error after deploying in Weblogic

    Halo,
    I have written excel macros and it is working fine.
    but if the same file if i try to open from hyperlink after deploying in Weblogic server , I get the error
    "error occured initializing the VBA libraries.
    If Microsoft Visual Basic for Applications (VBA) was not installed, or was set to Install on first use,
    (advertised, or set to install on demand) you may receive this error message.
    Depending on the mode of installation used and the rights of the user to change current settings,
    it is possible to install VBA through Control Panel, Add/Remove Programs, Microsoft Office, Add or Remove
    features. If Visual Basic for Applications is not listed as an installable feature of Office, the administrator
    of your system may have disabled it so it is impossible for you to install it. If VBA is not installed,
    it is impossible to run VBA applications/projects on this computer. "
    1. Even though Excel VBA application is installed in my machine , why am i getting this error.??
    2. I would like to know is there any way to open the excel file even though if the excel software is not installed in client machine??
    Appreciate your help.
    Thanks.

    Hi,
    I do not see any reason for this to not work.
    Is there any difference between the preferences for RX and RXI. Please go to "edit" -> "Preferences" -> "Security(Enhanced)" and uncheck "Enable protected mode at startup".
    Are you able to open any pdf from command line with the same command:
    "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"  <<PDF_FILE>>
    Thanks,
    Amish.

  • Using Excel macros & change properties

    Hi,
    1) my program use Excel macro via a runtime.exec(cmd). I want to use JWS to deliver new versions of application but if I have to put my macros in a jar file how can I reach them (no problem with a file propertie or with gif ressources).
    2) how can I change default properties ("Dossier des applications" in French maybe Applications dir in advanced) wich is enabled in the window.
    thanks a lot
    Sophie

    1) my program use Excel macro via a runtime.exec(cmd).
    I want to use JWS to deliver new versions of
    application but if I have to put my macros in a jar
    file how can I reach them (no problem with a file
    propertie or with gif ressources).You have a lot of options how to do this.
    I would try to use the I/O APIs that reads the macro file
    from a web server (InputStream is = url.openStream()) and put it
    in a local file (FileOutputStream = new FileOutputStream(file)).
    Of course you would need a local location where to store it, could
    be hardwired, or asked from the user.
    2) how can I change default properties ("Dossier des
    applications" in French maybe Applications dir in
    advanced) wich is enabled in the window.I do not understand what you want to do. Explain again.
    Regards,
    Marc

  • Glance screen update for lumia 520

    Why will 520 not get glance screen update..? Im aware tat both 720 n 520 chip set ram everything is same.. But y shld 520 users miss it?
    Solved!
    Go to Solution.

    I was told that the type of screen used on the 520 wasn't compatible with glance screen which could make sense as the screen is of noticeably lower quality than the one on the 620 and 720. So perhaps it wasn't possible to add that feature without it being a massive battery drainer.
    I don't think they've withheld the feature just to make you buy a better model.

  • 'Edit in Place' for XLSM-files (Excel Macro-Enabled)

    Hi,
    is it possible to activate 'Edit in Place' for xlsm-files (Excel Macro-Enabled Workbook file)?
    For xls(x)-files there is the link 'Edit This File', but not for files of type 'xlsm' allthough they could be dealt the same way with Excel.
    I know I can edit this files using the 'Add-in for MS Office' and via the 'Vibe Desktop', but it would be nice to deal them like other Excel-files.
    thx
    Martin

    Originally Posted by mschuhmann
    RTFM helps I admit:
    Novell Vibe 3.3 Administration Guide > Site Setup > Setting Up Site-Wide Customizations > Configuring File Associations for Edit in Place Applications
    Novell Doc: Novell Vibe 3.3 Administration Guide - Configuring File Associations for Edit in Place Applications
    Append ".xlsm" for the variable edit.in.place.file.applet.extensions, edit.in.place.file.webdav.extensions
    Hi Martin,
    Yeah, the Vibe docs can help on occasion
    Still, thanks for feeding it back to the forums as it can be quicker finding a hit in the forums than having to go through the docs!
    Cheers,
    Willem

  • Export to Excel - Macro problems

    I have moved this to the Discoverer forum. Exporting to Excel - Macro Problems
    Message was edited by:
    user385142

    Hello Denes.
    Excuse me for send you a message in this way , but I dont find other way to contact with you.
    Im using the export_excel_pkg, and really it work good.
    I have only one problem, I tell you.
    When, in one item, data is very long and numeric, by example a EAN code, without any class of format, by default it give me the value ###, Im studing the package and trying to resolve this, but if you can send me any idea it can help me a lot.
    Thanks in advanced.
    You are doing a great work for us.

Maybe you are looking for

  • Java 8 64 bit on Windows with NSS for FIPS 140 compliance

    I have asked this question on Stackoverflow but I am beginning to think that this may be a better forum to ask. According to JEP 131, Java 8 should provide a PKCS#11 Crypto provider for 64 bit Windows:  https://blogs.oracle.com/mullan/entry/jep_131_p

  • Help! My Monitor died!

    I apparantly need to replace the monitor for my G4 and can't figure out what will work on it. My husband seems to think that since the original was a VGA, that it needs to be replaced by another VGA. Is it possible that a TFT monitor would work (or w

  • Blank Login?

    Hi I have a problem with my admin username and password prompt window, It's blank.  I can't install new software or complete any operation that requires my admin username and password. I did some research and found a discussion that said it was a Jav

  • Including other PDF's in cfdocument

    I have been trying to include another NON cfreport PDF to cfdocument and it garbles the the cfinclude. I can create PDF's from coldfusion but cannot combine that with an already PDF in the same directory.. Is it possible to create a pdf and include a

  • Scheduled Tasks In Database

    not sure how to do it, but pls advice. I have the schedule task to pass diffrent ID nto url for the same page.  If I have 3 IDs, I don't want to create 3 pages from CF admin schedule like task.cfm?id=1 task.cfm?id=2 task.cfm?id=3 Instead of doing tha