Macros without LDB

hi friends.
Here i got a requirement on User-exit.For validating the current entry I should retrieve the preceding as well as later records(if there).
In this one I want to use macros in the process of validation.
But here No LDB was used.
Please, can Any one guide me on this requirement.
Is there any include program which was holding the defination for macro.
Thanks in advance.
Regards,
Chandra.

Hi Chandhu,
I'm not sure that you can use the Macro's without the LDB, here is the
include you are looking for.
include dbpnpcef001. "forms implementing macros
It is much easier to create the program using the PNPCE LDB attribute,
which then gives you access to all of the Marco's as well as other
functionality for HR programming.
You need to use the Logical Database PNP to use this macro. I would also
suggest that you replace the '-' with '_'. RP_PROVIDE_FROM_LAST.
TRMAC .
The RP_PROVIDE_FROM_LAST macro retrieves the last valid data recordin the data selection period.
The macro returns code .PNP-SW-FOUND has the value 1 , if the suitableentry exists in the infotype table for the specified period . If noentry is found , the value is 0.
thanks
abdul
reward me points if usefull

Similar Messages

  • Not able to use macro with LDB PNPCE

    Hi,
    I am trying to use macro 'rp-provide-from-last' as below with LDB PNPCE.But syntax error 'unable to  interpret SPACE' has occurred.
    rp-provide-from-last p0001 space pn-begda pn-endda.
    Please let me know how to use this macro with LDB PNPCE.

    The reason you are getting this error is that you would have used the GET Pernr. in start of selection.For PNPCE u have to define
    Nodes : person, peras.
    and then use the
    Get PERSON.
    Get PERAS in start of selection
    and then u can use the standard macros without any errors.

  • Rp_read_infotype macro wid LDB PNPCE ( Strange results )

    Hi Guys,
                 I’m working on LDB PNPCE. I was writing a report my requirement is to read all the records from 0001 and 0008, I used the macro  rp_read_infotype
    Well Here is the sample code what I’m trying to do ..
    start-of-selection.
    get peras.
      lc_pernr = peras-pernr.
    rp_read_infotype lc_pernr 0001  t_0001  '20000601' '99991231'.
      rp_read_infotype lc_pernr 0008  t_0008  '20000601' '99991231'.
      write:/ 'WHy?'.
    Now the funny thing with above code is that, if I’m passing the same parameter like I’m passing for ‘0008’. It just getting 1 result, ( as it has 4 records in pa0001 ) ,
    But in IT0008 its giving the all of 6 records .
    Then I change the code  , because if you select today on PNPCE selection screen it always take today’s date no matter what you are passing .  But its only behaving like that
    for IT0001.
    Then I change the code like
      lc_pernr = peras-pernr.
    rp_read_infotype lc_pernr 0001  t_0001  pn-begda      pn-enda.
      rp_read_infotype lc_pernr 0008  t_0008  '20000601' '99991231'.
    Its working fine for both in this case , but just notice my macro for it0008 is still the same . its still giving the same records , Even I select ‘ALL’ , DAY  or period on selection screen .
    My understanding is that for IT0001 it always retrieves current record where as for other infotypes it reads all records and considers passing parameters like I am doing for IT0008.
    Now this is very wired behavior for this macro for PNPCE. I have checked the OSS notes , There’re few OSS note which talks about this . But we are on SAPKE47052 support pack .
    That OSS notes are already in placed . Is any body out there also facing the same problem if no try to code in this way and see are you also facing the same problem . Then I should better post OSS message .
    Thanks a lot!!
    Saquib Khan
    "Knowledge comes but wisdom lingers!!"
    "Some are wise and some are otherwise"

    Well I read in PNPCE Documentation and my requirement is   to read specific period .
    <u><b>FYI</b></u>
    <b>Reading Infotypes: RP_READ_INFOTYPE</b>
    The RP_READ_INFOTYPE macro reads the data records of an infotype for the specified personnel numbers that are valid in the specified period, and writes these to the internal table specified. This table must be completed correctly. If no data records exist in the specified period, the PNP-SW-FOUND global switch is set to 0. Otherwise it has the value 1. In addition, an authorization check is performed for all data records. If no authorization exists for a data record, this data record is rejected (that is, it is not placed in the internal table). If data records are rejected because of missing authorization, the PNP-SW-AUTH-SKIPPED-RECORD global switch is set to 1. This switch is otherwise set to 0. The PNP-SW-IGNORELOCKEDRECORDS switch is also taken account of when the data records are read and controls whether locked data records are read or not.
    Normally, infotypes are read using the HR_READ_INFOTYPE function module. The RP_READ_INFOTYPE macro can improve performance when the data records have already been read by PNPCE and are in the internal buffer. PNPCE only read the data records that were requested by the report using the INFOTYPES statement. In addition, the buffer is deleted again at the latest after 100 processed personnel numbers. If however the report requests the data records using an INFOTYPES statement, it is not particularly meaningful to request the data records again for the same personnel number using the RP_READ_INFOTYPE macro. The buffer is only useful when the data records are called for a different personnel number if these personnel numbers belong to the block of the 100 current buffered personnel numbers. Always weigh up the advantages of this macro against the consequences of its use for performance
    Thanks
    SK

  • Macros & PNPCE LDB

    Hi,
    I am currently working on a program that uses PNP LDB.I want to use PNPCE instead of PNP in order to improve the performance of the program.
    Will the macros defined in the current program for PNP work for PNPCE also?If not then how can I get the macros for the same functionality for PNPCE?
    When I tried to change PNP to PNPCE, but made no changes to the macros, then I got an error that "space" is not recognized.Could you please help me understand how to solve the problem?
    Thanks.
    Sandeep.

    Below are the macros for PNPCE:
    For validity period : 1. RP_SET_DATA_INTERVAL_INFTY,
                                 2. RP_SET_DATA_INTERVAL,
                                 3. RP_SET_DATA_INTERVAL_ALL
    For Mode Change: 1. PNP_SET_INFTY_MODE_BY_NAME
                                2. PNP_SET_INFTY_MODE_BY_NUMBER

  • How to use a macro with AAA Authorization set?

    So!
    We have ACS version 4.1, and one goal is to start working on authorization sets for groups. I am able to get basic commands to work, but was curious about making a macro work without having to allow all of the commands that are actually contained wihtin the macro itself.
    I'm looking into this to promote standardization and minimize confiugration issues/inconsistencies on ports accross swtiches in our environment.
    The macro I created is used for configuring a port on a swtich to change its VLAN.  Basically as follows:
    macro name T2
    Description $DESC
    switchport mode access
    no cdp enable
    switchport access vlan $STATIC
    switchport port-security
    switchport port-security aging time 2
    switchport port-security violation restrict
    switchport port-security aging type inactivity
    storm-control broadcast level 25.00
    storm-control action trap
    switchport nonegotiate
    no lldp transmit
    no lldp receive
    #macro keywords $DESC $STATIC
    In ACS I've created a shell command authorization set, and allowed 'macro' with 'permit apply T2' and 'permit trace T2'.  This works fine and allows me to use those macro commands.  The problem I'm having is that every command in the macro is not allowed in the authorization set, so when I run the macro it fails for each command.
    I don't want to allow each individual command in the authorization set as it would then allow jr. admins the ability to make config changes on ports that would be outside of our standard.  For example they could get into a port and forget to disable CDP and LLDP, casuing inconsistencies accross the envrionment.  Is there a way to run these macros without putting all of the commands in the authorization set?

    Hello Eric,
    Please see the below link for configuring Macro and how you can use them with AAA
    http://www.cisco.com/en/US/docs/switches/lan/auto_smartports/12.2_55_se/configuration/guide/configure.html

  • How to can we do selection-screen modification for LDB?

    Hi All,
    I have custom field in my selection-screen of LDB PNP.
    Can you people please let me know how can I put the selection-screen modificaiton For ex:
    i have created
    parameters a as checbox.
    select-options: p_btrtl for p0001-btrtl no-intervals.
    now If the check box is selected then p_btrtl we can enter values or esle If check box is not selected then p_btrtl will be grayed out, ( I.e. SCREEN-INPUT = 0)
    This is simple from ABAP without LDB. But with LDB can we achieve?????????????
    Satish
    Edited by: Satish Vasireddy on Jun 23, 2010 4:05 PM

    you can use the following logic for the additional selection validation. I have done by using PNP LDB. Ex : I have done for one of the field in IT0377.
    SELECT-OPTIONS: s_bplan FOR p0377-bplan.
    *&      Form  check_selection_0377
      This subroutine is used to check the selection screen
    FORM check_selection_0377.
      LOOP AT p0377 WHERE pltyp  IN s_bplan
                     AND levl1 IN s_lti
                     AND   begda LE pn-endda
                     AND   endda GE pn-begda.
        CALL FUNCTION 'HR_CHECK_AUTHORITY_INFTY'
          EXPORTING
            tclas            = 'A'
            pernr            = pernr-pernr
            infty            = p0377-infty
            subty            = p0377-subty
            begda            = pn-begda
            endda            = pn-endda
            level            = 'R'
          EXCEPTIONS
            no_authorization = 1
            internal_error   = 2
            OTHERS           = 3.
        IF NOT sy-subrc IS INITIAL.
          DELETE p0377.
        ENDIF.
      ENDLOOP.
    selection not found and no value selected
      IF sy-subrc NE 0.
        READ TABLE s_bplan.
        IF sy-subrc EQ 0.
          REJECT.
        ENDIF.
        READ TABLE s_lti.
        IF sy-subrc EQ 0.
          REJECT.
        ENDIF.
      ENDIF.
    ENDFORM.                    " check_selection_0377
    Regards,
    Preetham

  • LDB..

    Hii All,
    Any one pls send me some interview ques on LDBs??
    Regards,
    Kavitha

    Hi Kavitha,
    pls find here some general ques for interview,
    1.     Preparation of the data records by the L.D.B and reading of the data records in the actual report are accomplished with the command pair Put and Get.
    2.     The three main elements of LDB are Structure, Selections, and Database Program.
    3.     In LDB what determines hierarchy of the tables?
    Structure.
    4.     In general what are the two ways in which one can retrieve data from tables?
    Using Select statements, Database Program.
    5.     With LDB one can modify the pre-generated selection screen to their needs (T/F).
    Yes.
    6.     Logical databases are programs that read data from Database tables (Dictionary Structures).
    7.     The event Get<table name> LATE process all tables that are hierarchically superior to the <table name>. (True/False)
    False.  It processes all tables that are hierarchically inferior to the <table name>.
    8. The Database Program of LDB is a collection of SUBROUTINES, which selects data and passes it to the report.
    9.     The layout of the Database program is determined by both Structure and Selections.
    10.      The order in which data is made available to the report depends on Structure of the LDB.
    11.     Apart from the structure and selections of the LDB the GET statements in the report determines the behavior of the database at runtime.
    12.     Node at the highest level in the structure is known as Root.
    13.     There can be more than one node at the highest level in the structure. (T/F)
    False.  One can define only one node at the highest level in the structure on LDB.
    14.     All nodes in the structure of LDB need not be defined in the ABAP/4 Dictionary (T/F).
    False.  One has to define all nodes in the Dictionary or one has to select all nodes that are defined in the Dictionary.
    15.     It is not possible to use ABAP/4 Dictionary Structures without an underlying database using LDB. (T/F)
    True.  One can use additionally related tables, along with the tables defined in the structure of LDB.
    16.     Dynamic selections allow the user to define further selections for database access in addition to the selection criteria already defined in the LDB selections.
    17.     Check statement can be used along with the event GET in the report for checking the selections, which are not table-specific values.
    18.     In sense of Database Management System (DBMS) LOGICAL DATABASE is a database Structure. (T/F).
    False.
    19.     It is not necessary to maintain the Parent-Child relationship between the tables in Logical Database Structure. (T/F)
    False.  One has to maintain the Parent-Child relationship.
    20.     Is it possible to extract data from tables without using the event ‘GET’ in the report with an appropriate LDB. (T/F).
    False.  One can extract data from tables using Select statements in a report, though the report is having a LDB attribute.
    21.     What sorts of tables one can se in designing the hierarchy of a LDB?
    Tables, which are having Foreign Key relations.
    22.     A report program, which uses only SELECT statements, is called SQL Report.
    23.     One cannot use SELECT statements in a report program linked to a Logical Database (T/F).  False.
    24.     Is it true that the Logical Database reads the data from the database tables using Select Statements (T/F).
    Yes. We are coding that in Database part of LDB.
    25.     In a report with an LDB attribute, you do not have to define how the information should be retrieved from the database tables, but only how the data should be represented on the screen. (T/F).
    True.
    26.     One can use the event GET in a report without LDB attribute. (T/F).
    False.
    27.     The last character of the LDB name denotes Application.
    28.     The structure of Logical Databases reflects the Foreign Key dependencies of hierarchical tables in the SAP system.
    29.     It is mandatory that for each table in the LDB hierarchy there should exist one GET statement in the report. (T/F).
    False.  It is not necessary.
    30.     What happens if a report does not contain a GET statement for a particular node of a Logical Database.
    Process will transfer to the next event.
    31.     In a Logical Database, one can define input fields on the selection screen with Select-Options and Parameters statements.
    32.     Suppose a logical database program contains the following lines:
    SELECT-OPTIONS CONNID FOR SPFLI-CONNID.
    PARAMETERS CARRID LIKE SFLIGHT-CARRID FOR TABLE SFLIGHT.
    What will be the output, for the above two statements?
    Only select-options connid for spfli-carrid will be displayed on the screen.
    33.     Consider a report with F1S attribute, what will be the output for the following code.  Whether you will get the data from spfli and sflight or not, with corresponding tables statement,
         GET SPFLI.
         GET SFLIGHT.
         Write:/ spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid.
         Yes, you will get the data from spfli and sflight.
    34.     Consider a report with F1S attribute, what will be the output of the following code.  Whether you will get the data from sbook or not, with corresponding tables statement.
    GET SPFLI.
    GET SFLIGHT.
    Write:/ spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid.
    You cannot extract data from sbook.
    35.     Identify any errors in the following code and correct the same, and what will be the output.  If there exists corresponding tables statement, for spfli, sflight, sbook.
    GET SPFLI.
    GET SBOOK.
    Write:/ spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid, sbook-class.
    No syntax errors.  You will get data from all the three tables.
    36.     Does the following two statements do the same task?  If so which one takes less time and which one is recommended.
         Select * from spfli where spfli-carrid = ‘LH’ and spfli-connid = ‘400’.
         Endselect.
         Select * from spfli. Check: spfli-carrid = ‘LH’ and spflid-connid = ‘400’.
         Endselect.
        -Yes they will do the same task.  Second Select statement takes less time and is recommended.
    37.     If you want to improve the response time (time to access data) Logical Databases permits you to achieve this using VIEWS.
    38.     Is there any upper limit (max) to the possible number of nodes in a logical database structure? If so what is the limit?
    Yes, there is an upper limit for defining number of nodes in a Logical Database Structure.
    Maximum nodes = 1200 / length where length = max. Length of name in the structure.
    39.     In the structure of Logical Database nodes at different levels are displayed in the same columns. (T/F) If false what types of nodes are displayed in the same columns. If true what type of nodes are not displayed in the same columns.
    False.  Nodes at same levels are displayed in the same columns.
    40.     What are the advantages of Logical Databases?
    It offers an easy-to-use selection screens.  You can modify the pre-generated selection screen to your needs.  It offers check functions to check whether user input is complete, correct, and plausible.  It offers reasonable data selections.  It contains central authorization checks for data base accesses.  Enhancements such as improved performance immediately apply to all report programs that use the logical database.
    41.     Though all the ABAP/4 Dictionary Structures that exists in the structure of the LDB, being defined in Database Program, we are defining the Dictionary Structures in the Report.  What is the reason for such declaration?
    By declaring so we are providing work areas for data passing between Logical Database and Report.  In addition, the logical database configures the selection screen depending on the selection of database tables.
    42.     Is it mandatory to declare all the tables in Report by the key word tables for all the tables that exist in the structure of LDB, and are being defined in the Database part of LDB.
    No, It is not mandatory to declare all tables in report.
    <b>
    Rewards points if useful</b>
    rgrds
    shazia

  • Office control ms_word - runmacro, calling a macro with parameters

    How can I call word macro with parameters?
    I have ms word document with macro, for example:
    Sub Makro1(ByVal bookmark As String, ByVal text As String)
    ' Makro1 Makro
        Selection.GoTo What:=wdGoToBookmark, Name:=bookmark
        Selection.TypeText text:=text
        ActiveDocument.Bookmarks(bookmark).Delete
    End Sub
    I try call this macro from webdynpro:
      TRY.
          CALL METHOD
    wd_this->document->IF_IOS_APPLICATIONPROPERTIES~RUNMACRO
            EXPORTING
              NAME             = 'Makro1("z1","test")'
              ERRORINFORMATION = co_error_getcontent_stru
       IMPORTING
         RESULT           =
        CATCH CX_IOS_APPLICATIONPROPERTIES .
        CATCH CX_IOS_COMMUNICATIONWRAPPER .
        CATCH CX_IOS_ENVIRONMENT .
      ENDTRY.
    This macro cannot call. )
    Calling a macro without parameters is ok.
    Sub Makro2()
    Call Makro1("z1", "test")
    End Sub
          CALL METHOD
    wd_this->document->IF_IOS_APPLICATIONPROPERTIES~RUNMACRO
            EXPORTING
              NAME             = 'Makro2'
              ERRORINFORMATION = co_error_getcontent_stru
       IMPORTING
         RESULT           =
    Greats Radek

    1. Yes. Download from some location as binary file.
    2. Unzip by class CL_ABAP_ZIP. For filling bookmarks i need file 'word/document.xml'.
      CL_ABAP_ZIP->GET
    Unzipped files are only in memory.
    3. For parsing and filling bookmarks i use classes and interfaces cl_ixml, if_ixml*
    * create a DOM from the xstring
      lr_ixml = cl_ixml=>create( ).
      lr_stream_factory = lr_ixml->create_stream_factory( ).
      lr_istream  = lr_stream_factory->create_istream_xstring( iv_docx ).
      lr_document = lr_ixml->create_document( ).
      gr_document = lr_document.
      lr_parser = lr_ixml->create_parser( document       = lr_document
                                          istream        = lr_istream
                                          stream_factory = lr_stream_factory ).
      CALL METHOD LR_PARSER->ADD_PRESERVE_SPACE_ELEMENT
        RECEIVING
          RVAL   = lv_rval.
      IF lv_rval <> abap_true.
    * Err in parser XML
      ENDIF.
    CALL METHOD LR_PARSER->SET_XML_SPACE_AWARE.
    IF lv_rval <> abap_true.
    * Err in parser XML
    ENDIF.
    * Finding and filling bookmarks
      lr_root     = gr_document->get_root_element( ).
    * All elements "w:bookmarkStart"
      lr_elements = LR_ROOT->GET_ELEMENTS_BY_TAG_NAME(
    *      DEPTH     = 0
          NAME      = 'bookmarkStart'
          NAMESPACE = 'w'
      lr_itr_bookmarkStart = lr_elements->create_iterator( ).
      DO.
        lr_node = lr_itr_bookmarkStart->get_next( ).
        IF lr_node IS INITIAL. EXIT. ENDIF.
        lr_attributes = lr_node->get_attributes( ).
    * Read attribute "w:name" of element "w:bookmarkStart"
        lr_attribute = lr_attributes->get_named_item(
          NAME      = 'name'
          NAMESPACE = 'w'
        lv_name = lr_attribute->get_value( ).
        if iv_name <> lv_name. continue. endif.
    * Element "w:fldSimple" was found, iv_name = Name of bookmark to fill
        lv_bookmark_found = abap_true.
        lr_node_bookmarkStart = lr_node.
    * Read attribute "w:id" of element "w:bookmarkStart"
        lr_attribute = lr_attributes->get_named_item(
          NAME      = 'id'
          NAMESPACE = 'w'
        lv_id_start = lr_attribute->get_value( ).
    clear lv_id_end.
    * .... work with parser
    * find element w:bookmarkEnd for relevant w:bookmarkStart, bookmarkEnd with the same id as bookmarkStart
            lr_node_next = lr_node->get_next( ).
            do.
              IF lr_node_next IS INITIAL. EXIT. ENDIF.
              lr_node = lr_node_next.
              lv_name = lr_node->get_name( ).
              if lv_name = 'bookmarkEnd'.
                lr_attributes = lr_node->get_attributes( ).
    * Read attribute "w:id" of element "w:bookmarkEnd"
                lr_attribute = lr_attributes->get_named_item(
                  NAME      = 'id'
                  NAMESPACE = 'w'
                lv_id_end = lr_attribute->get_value( ).
              endif.
              if lv_id_start = lv_id_end.
                lr_node_parent = lr_node->get_parent( ).
                lr_node_bookmarkEnd = lr_node.
                er_node_bookmarkEnd = lr_node.
                exit.
              else.
                lr_node_next = lr_node->get_next( ).
    * remove elements between bookmarkStart and bookmarkEnd
                lr_node->remove_node( ).
              endif.
            enddo.
    * insert new elements between boomarkStart and bookmarkEnd
    CALL METHOD me->XML_RUN_TEXT_ADD
              EXPORTING
                IR_PARENT = lr_node_parent
                IR_REF    = lr_node_bookmarkEnd
                IV_VALUE  = iv_value
              IMPORTING
                EV_OK     = lv_bookmark_ok.
      EXIT.
    ENDDO.
    For example, XML with bookmark:
    <w:bookmarkStart w:id="0" w:name="testing123"/>
    <w:r>
    <w:t>This is sentence two.</w:t>
    </w:r>
    </w:p>
    <w:p>
    <w:r>
    <w:t xml:space="preserve">This </w:t>
    </w:r>
    <w:bookmarkEnd w:id="0"/>
    4. replace file 'word/document.xml' in zip (.docx) with class CL_ABAP_ZIP.
    CL_ABAP_ZIP->DELETE
    CL_ABAP_ZIP->ADD
    5. You can store result where you need.
    6. You can use for editing by users classic dynpro with container with word.

  • Demand Planning : Macros -drilldown functionality

    Hi All,
    I am trying to use the function DRILLDOWN (DRILL_DOWN( 'characteristicu2019 , <'internal'> )and trying to drilldown to characteristic eg MARKET (to get forecast values with respect to different markets ) .How can I access the drilled down values for each markets after the execution of this macro? The drilldown is internal and it is not displayed to the user.Is there a functionality in macro or user exit macro to access the values so that I can do additional checks and give a message to the user?
    Thanks & Regards,
    Savitha

    Do you want to run this as a background job and send messages to the user or do you want to do it interactively
    if youw ant to do it in the background...
    Just copy the book and run the same macro without the internal in it
    you can use this book for generating the messages.
    you just drill down and dont have to drill up
    just make sure your users dont have access to it
    Interactively, you can create a combination macro(this option appears when you create the maco) that has the following macros as the steps in sequence
    1. Drill down
    2. Calculation/ Checks/warning  --> save this to some place that can be extracted later - for eg a table
    3. Drill up
    use anther macro that will then extract the table values and display or mail to users or create a program that can read the table with selections

  • Signicance of LDB

    What is the significance of GET PERNR Event in LDB? and why do we use this.
    How it is related to LDB?
    What is the difference between running payroll with LDB and without LDB?
    why should we implement LDB..

    Hi,
    Logical Databases are special ABAP programs that retrieve data and make it available to application programs.
    Use of LDB – is used to read data from database tables by linking them to executable ABAP programs.
    There are the events used for Logical Database.
    Two Events –
    GET - This is the most important event for executable programs that use a logical database. It occurs when the logical database has read a line from the node <table> and made it available to the program in the work area declared using the statement NODES <table>. The depth to which the logical database is read is determined by the GET statements
    PUT - The PUT statement directs the program flow according to the structure of  
    the logical database.
    What is the difference between Get and Get Late?
    GET - After the logical database has read an entry from the node <table>.
    GET LATE - After all of the nodes of the logical database have been processed that are below <table> in the database hierarchy.
    Thanks,
    Sandeep.

  • Macro in Excel 2010 running 10 times slower

    I wonder if anyone here could help or explain a strange behavior in Excel 2010! I believe it is a bug in Excel.
    In one of my workbooks I had some macros which after running for a while started to slow down (several times slower)!
    To make a long story short I striped down the Excel workbook and created 2 really simple workbooks: one runs a macro in 0.25 sec, and a second one that runs the same macro in 3.3 sec. Both have identical macros and identical formulas in Sheet1 (only one
    Sheet in each workbook).
    Moreover, the "Good copy" workbook slows down if the "Bad copy" is opened. Once the "Bad copy" is closed the "Good copy" gets back to speed.
    If the Calculation is set to manual then both are running fast (this points to a workbook re-calculation delay).
    If in the "Bad copy" I delete the three columns with formulas and I recreate them in new columns, then the "Bad copy" gets back to running fast again.
    It seems that Excel will compute only the required cells when a cell changes, which makes sense.
    However, in the "Bad copy" those three columns must have something that triggers a new calculation of that workbook every time the VB writes to a workbook even if the macro runs on another workbook! This is very strange to me!
    These simplified workbooks contain only one trivial macro (I made them just to isolate the issue):
    Sub simple_macro()
        Application.ScreenUpdating = False
        Dim starttime, taken
        starttime = Timer
        For i = 1 To 500
        Cells(1, 5).Value = i
        Next i
        taken = Round(Timer - starttime, 2)
        Cells(2, 5).Value = taken
        Application.ScreenUpdating = True
    End Sub
    I do not think you can recreate easily the problem starting with a new workbook, so I wish there would be a way to post here the two copies! I was hoping that someone from Microsoft would take a look at the "Bad copy", because this behavior can
    slow down anyone's macro without even knowing it! I think I have other workbooks with the same issue.
    Thanks for any comments anyone might have!

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Excel, I'll move your question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Custom Toolbar from Macro is not updating when Macro is updated

    I have a Word template 2010 (.dotm) that has a macro that originated at least 2007, if not earlier.  There is a Customized Toolbar with Drop downs in the Add-ins tab populated from the Macro that contains a list of names. The drop down values have stopped
    updating as additional names have been added.  I can get the individual names to appear in the QAT but that is not what we need. How do I get the Drop Downs in Customized Toolbar to update so that the new names appear under the drop down as specified
    in the macro?  This is a snip it from the macro
    Drop down is US
    Name in Drop Down is Sales1
    Sub USSales1()
    ' USSales1 Macro
    ' Macro recorded 2/5/2007 by Myerse00
        Selection.TypeText Text:="Sales Region 1"
        Selection.MoveRight Unit:=wdCell
        Selection.TypeText Text:="149 Branch"
        Selection.TypeParagraph
        Selection.TypeText Text:="CA"
        Selection.MoveRight Unit:=wdCell
        Selection.MoveRight Unit:=wdCell
        Selection.TypeText Text:="805"
        Selection.TypeParagraph
        Selection.TypeText Text:="805"
        Selection.TypeParagraph
        Selection.TypeText Text:="Please email"
    End Sub
    Any suggestions would be very much appreciated.
    N-

    Easily customizable toolbars were a feature of Word 97-2003 that corporate IT departments complained about. MS eliminated them, giving us the QAT instead. Such a toolbar never would have been automatically updated.
    You can modify your toolbar using Word 2003. Otherwise, you can learn to do it using vba. I've never had the patience.
    You can create custom ribbon tabs which are both more powerful and useful using XML (not through the Word 2010 program directly).
    Customize the Ribbon (It doesn't take rocket science)
    You may also want to explore the use of AutoText and Building Blocks.
    Automated Boilerplate Using Microsoft Word With the AutoTextList field these could perhaps replace your macros without learning a lot of programming.
    AutoTextList field - How to add pop-up lists to any Word document, so you can click your way through changes in seconds
    Charles Kenyon Madison, WI

  • Scan office 2003 files that contain macros

    Hello
    My web server let's the user upload files and send them to other users.
    I am looking for an option to find if an uploaded office 2003 file contain a macro without have to open the file.
    If it contains a macro the web server will reject the file.
    Thank you

    Hi,
    I'm afraid it's hard to determine if the Office 2003 file contains macros even if by opening the file. Actually you can do this with Office PIA, with the help of VBProject property of the Office object model, take a look at the discussion in this thread:
    How to identify the excel file contains
    macro or not
    MVP Siddharth Rout has given a workable solution, by using VBA to automate Office object model to open the file and check the VBProject. But as you know, Office automation is not recommended in a web server, there could be some unpredictable problems.
    Considerations for server-side Automation of Office
    So I think the only way is to analyze the file stream with your own code. As far as I know, a file with macros should contain "_VBA_PROJECT_CUR" in the binary file.
    Check the Excel Binary Format document here:
    2.1.7.18 VBA Storage (_VBA_PROJECT_CUR)
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Process Message Macro

    Dear Macro Gurus
    I need a message prompt when a user enters a value in a cell.
    Condition is
    In the header IF NOT
    At least one value of Char 1 selected AND
    At least one value of Char 2 selected OR
    At least one value of Char 3 selected OR
    At least one value of Char 4 selected.
    Prompt a message: "You cannot make a change at this selection"
    or more generally is there a way to gray out key figure input based on the characteristic drill down situation for a logged user?
    Real example.
    A salesperson is expected to enter an "adjustment" by selecting at least one product and one channel or one customer... these are the characteristics in a particular data view.
    Thanks
    BS

    Dogboy,
    I made a 200 slide deck on Macros. 150 of them are screen shots of macros with commentary incl. real macros of real companies..a dozen of them without citations. Its not stolen. Some kind folks shared it on request as they too were excited at the idea of such a training. I used this deck to train one of my clients users on how to write their own macros without paying to pay 500 USD per line.
    The screen shots explain each and every icon and its interpretation. Good for beginners to intermediate consultants. The training itself will take 3 full days.
    How much do you think I can sell this deck for to ignoramuses out there (likes of me) ? :-)
    Be assured. Presentation is of top quality. The kinds SAP factory produces.. slick, blue and yellow. That is another skill I mastered since working on SAP. Making presentations.
    For a start I can send my training deck to you for free. but you need to share your official email id here. You will receive it in next 5 minutes
    some snips are attached..
    Thanks
    BS

  • Unable to run macros

    I'm not longer able to run macros – is their a Automatic update that prevent macros? The execution stops by a simple piece of code, that was acknowledges previously. The macro runs perfectly on another computer.
    Around New Year a had a similar problem and was successfully recommended a "Fix it" patch which solved the problem…
    :) Søren

    Hi
    The macro is running but fails on a command code line. The message box says that the "Method 'Paste' of object '_Worksheet' failed
    I don't know where to find "the Trust center settings? The PC is stand alone and not part of a domaine…
    :) Søren
    File-àOption-àTrust
    CenteràMacro Settings-àDisable
    all macros without notifications

Maybe you are looking for