Cells values not updated by VBA commands

Hi.
Can you please see why the three lines under the
'Fetching default values for certain fields
don't work?
No error is raised, the similar command preceding these three works fine. Target cells remain empty.
Sub AddReservations()  
  ActiveSheet.Unprotect
    Dim tblTarget As ListObject
    Dim rowNew As ListRow
    On Error GoTo FailedAddRow
    Set tblTarget = Sheets("Reservations").ListObjects("ReservationsTable")   
Set rowNew = tblTarget.ListRows.Add       
tblTarget.DataBodyRange.Cells(rowNew.Index, tblTarget.ListColumns("Contract").Index) = tblTarget.DataBodyRange.Cells(rowNew.Index - 1, tblTarget.ListColumns("Contract").Index) + 1      
     'Fetching default values for certain fields - THESE THREE DO NOT WORK:  
tblTarget.DataBodyRange.Cells(rowNew.Index, tblTarget.ListColumns("Insurance Per Day").Index) = Range("Default_Insurance_Fees").Value   
tblTarget.DataBodyRange.Cells(rowNew.Index, tblTarget.ListColumns("VAT Rate").Index) = Range("VAT_Rate").Value   
tblTarget.DataBodyRange.Cells(rowNew.Index, tblTarget.ListColumns("Commission Rate").Index) = Range("Default_Commission_Rate").Value       
'Positioning the cursor on first entry field   
tblTarget.DataBodyRange.Cells(rowNew.Index, tblTarget.ListColumns("Contract").Index + 1).Select
CloseSub:
    ActiveSheet.Protect
    Exit Sub
FailedAddRow:
    msgbox "Failed to add new row to the table."   
GoTo CloseSub
End Sub
Thank you!

I set up a dummy table with same table name and column headers plus 3 named ranges for the values to be inserted and the code works fine. I suggest that if the fields are left blank then they are not getting values from the named ranges. Are you sure the
named ranges are pointing to the correct cells with the required values?
Try inserting the following lines in prior to the problem lines and then run the code and then check the Immediate window to see if the named ranges actually returning values.
Debug.Print "Default_Insurance_Fees = " & Range("Default_Insurance_Fees").Value
Debug.Print "VAT Rate = " & Range("VAT_Rate").Value
Debug.Print "Default_Commission_Rate = " & Range("Default_Commission_Rate").Value
Regards, OssieMac

Similar Messages

  • Contract value not updated in open order value of credit management

    My requirement is i have created the contract and activated the credit management by assigning credit  group to contract document type, In item category the credit is active and in pricing subtotal is also assigned .
    But when i create the contract , the open order value is not updated .
    i do not want the credit to be active at order level.
    Dear guru's
    please let me know where i am going wrong
    thanks in advance

    hi,
    open sales orders value not updating currectly in sales value of CM
    http://wiki.sdn.sap.com/wiki/display/ERPLO/CreditmangementIn+SD-FI
    i think you have to run a report which is under the link number 1.
    regards,
    balajia

  • Statistic condition values not updated during Sales order Settlement

    Hi,
    In our client we have different Price condition types for based on scenario wise. Ex: Domestic Sales (ZPR1) and Export Sales ZPR2. I have maintained separately value fields for each price condition types.
    We are booking some financial charges, and interest on working capital etc., this cost we need to transfer to COPA each Material wise based on sales revenue.
    For this purpose we have created one COPA Assessment Cycle.  Tracing factor is Sales Revenue and receiver is Materials.
    In COPA Assessment cycle we can give only one base means ZPR1 related value field or ZPR2 related value field.
    For this reason we have created one new statistic condition type,  what is amount there in ZPR1 that amount will updated automatically in statistic condition place and so that we can give once one trance factor in COPA Assessment Cycle. We have assign this statistic condition all pricing procedure
    Now my problem is in MTS scenario statistic condition values updated correctly. But in MTO scenario sales order settlement time statistic condition values not updated.
    So is it possible update during sales order settlement time statistic condition values.
    Please give me suggestion.
    Regards,
    Thiru

    Hi Ajay Sir,
    As you said is correct.
    But in our client we have around 9 Plants and each plant manufacturing product are different. Client Requirement is in COPA Report they need see each product wise sales revenue. In this way we mapped product wise value field.  System already mapped one guy in this way earlier. Now I am doing some changes for relevant to month end activities.
    Some financial changes transfer to COPA each plant wise on Material. Here sender is cost center and receiver is Material. Base is Sales Revenue.
    Please suggest me is there any alternative.
    Regards,
    Thirumalesh .

  • Subscription value not updated despite payment made days ago

    Please help this is frustrating have been waiting for 3 days now payments have been made but subscription value not updated on skype account 

    Hello and welcome to the Skype Community.
    You have totally different issues. ALWAYS start your own topic please.
    1.0. Philippines Subscription.
    Your account shows that you have used your full minutes allocation in your current billing cycle and your next minutes will be added to your account when your next billing cycle starts on July 17th 2015.
    Renewing your monthly Subscription before your billing cycle ends has no effect on the date upon which your minutes allocation will be added to your account.
    To continue calling until your next minutes allocation is applied to your account please purchase either a Subscription but with a different amount of minutes or Skype Credit.
    2.0. Your account shows that you are calling a cellphone in Austria. Please note that only calls to landlines in Austria are included in the Unlimited World Subscription.

  • Bug: date inserted in cell does not update automatically

    Can't find where to report a bug in Numbers. When I insert a date in a cell and set it to update automatically, it does not update. Have to update it manually daily. Seems there used to be a way to report bugs...
    Anyone know how to do that now?

    Feature already reported.
    +The Numbers User Guide states:+
    +To add and format the date and time, place the insertion point where you want the value to appear, and then choose Insert > Date & Time.+
    +To change the date and time format, Control-click the date and time value, choose Edit Date & Time, and then choose a date and time format from the pop-up menu. If you want the spreadsheet to always show the current date and time, select “Automatically update on open.”+
    +Alas, under 10.4.11 *(and now under 10.6.1)* this feature doesn't apply.+
    +The date remains as it was when we entered it.+
    +Happily we have a simple workaround:+
    +we may use the formula =TODAY()+
    +But a feature wihch doesn't behave as described may be called a buggy one. Isn't it ?+
    As long as the feature doesn't behave as described, use the given workaround.
    Yvan KOENIG (VALLAURIS, France) samedi 12 septembre 2009 16:50:38

  • Letter of Guarantee Value not Updating with Payments

    Dear Expert
    The requirement from the user is that when a payment is made , the system should deduct the amount paid and refresh the new available value for the customer.
    For Example : A Financial document is created with 1000 value . And Sales order created for 8000 . Therefore now the open value is 2000. This means that the customer can order goods worth 2000 only.
    In the meanwhile the first order is delivered and billed . And the customer has paid 8000 when he received the bill. this means that now he has paid so he can now order more goods worth 8000.
    but in the system it still shows open value as 2000 , although now that the customer has paid, it should be updated with the payments made so the value can be used by the customer that he had paid.
    If any of you has any idea how to tackle this ( it works same way in credit management ) but not in financial documents.
    we were thinking of another work around , i.e by closing the Financial document that has been paid and creating a new one by adding the remaining balance. i.e 2000+ 8000 , this way the customer can again use his value. but then how can we automate the system to alert the sales user that the payment has been made for a certain invoice for a certain LG.
    your idea's and suggestion are highly welcome
    Best regards,

    Dear ATGSD,
    The functionality in GTS is designed for modelling of a single financial document for which the initial value is not updated.
    I understand your user's requirement, but surely that is dealt with simply by setting a credit limit in the SAP ERP system?  There should be no need to use the GTS functionality at all.  In the ERP system, the credit limit is updated by the account payments, exactly as your user requires.
    Please let us know if that would work, or if there are more detailed requirements that are not apparent from your post - thanks.
    Regards,
    Dave

  • Excise base value not updated

    Dear all,
    We have found that excise base value is not updated after creating excise invoices,later we corrected it,
    excise base value started updating in table J_1IEXCDTL,
    Intially for 2 months excise base value is not updated in table,
    Is there any problem will arise in future ?
    or
    How to solve this issue ?
    Jeyakanthan

    Awaiting valuable replies.....
    Edited by: Jeyakanthan A on Mar 6, 2010 5:36 PM

  • Automatic Product Selection item value not updated in S067

    Hello,
    We have a requirement for Automatic product selection based on ATP with pricing at item level. This is working fine.
    But the value of the subitem is not updated in open delivery value S067 after saving the delivery.
    The item category is marked as credit active. update group is 15.
    If i do main item pricing then the value is getting updated successfully.
    I check several notes but nothing helped.
    Pls. help.
    Regards,
    Praveen

    assigned it in sales order at item level in Billing tab
    Assign the same at header level billing tab in sale order.
    thanks
    G. Lakshmipathi

  • Open order value not updated in F.35

    Hi
    While using item category Tas ( Third party item ) in Sale order, it is not updated in open order value at F.35.
    please give your suggestions. thanks.
    Regards,
    Tirumal.R

    1/ Check your credit control area settings
    2/ Check your sales order config, if it works for one sales order type and not the other compare the two/

  • Invoice correction request (net value not updating)

    Hi guys,
    I have a problem when creating an Invoice correction request (RK).
    When I change the Target quantity in the item (L2N), the Net value is not updated. So I have to go to Conditions and Carry out new pricing.
    Any idea to fix this.
    Best regards,
    Eduardo

    Hi Eduardo
    Check the copy control  VTFA , what is the pricing type it is being used and what is the quantity field maintained  -ve or +ve or kept blank .
    Even Go to item data->conditions tab and click on analysis you will know the problem why it is not changing the gross price
    Regards
    Srinath

  • Invoice value not updating for limit PO

    Hi Experts,
    SRM 5, SP 10 ECC 6.
    Limit PO is created, invoice posted in ECC, the invoice vaue is not updating in the Statistics tab at item level of PO,Calculated Value  is showing 0.00 only
    any idea.
    Thx

    Hi David,
    The problem is coming for limit order only, not for normal order and bbp_get_status is running fine for confirmation and normal po, so no need to run again

  • ITS templates - checkbox value not updated

    Hi,
    I am experiencing a problem with checkboxes in my Internet Service (similar to problem described in forum: checkboxes in ITS (again) ).
    The checkboxes are inside a table (step-loop) and is blank by default. If the user selects the checkbox, the value is cleared after user input.
    I executed the dialog program and it is fine.
    The generated service template was modified to accommodate the step-loop. I'm using the SAP_TEMPLATE tags for the WEBGUI look & feel.
    To set the checkbox parameter according to the user's input, should an if-statement be inserted in the code or should I use the parameter "onclick" with a javascript function?
    I inserted an if-statement but it doesn't work.
    Here's my code:
    `SAP_TemplateTableBegin(title="Some title:", type="SAP_WEBGUI")`
    `if ( IT_BEHAV-DESCR.dim > 0 )`
    `repeat with j from 1 to IT_BEHAV-DESCR.dim`
      `SAP_TemplateTableRowBegin(isSelectable="X")`
       `SAP_TemplateTableCellBegin(subtype="NONEDIT1")`   `IT_BEHAV-DESCR[j]` `SAP_TemplateTableCellEnd()`
    <b>   `if (IT_BEHAV-SELECT[j].selected)` checked `end`
       `SAP_TemplateTableCellBegin(subtype="NONEDIT1")` `SAP_TemplateSimpleCheckBox("IT_BEHAVE-SELECT", VALUE="`j`")` </b>           
        `SAP_TemplateTableCellEnd()`
              `SAP_TemplateTableRowEnd()`
             `end`
           `end`
         `SAP_TemplateTableEnd()`
    If the check on the value of the checkbox is performed within SAP_TemplateSimpleCheckbox tag (e.g. <b>`SAP_TemplateTableCellBegin(subtype="NONEDIT1")` `SAP_TemplateSimpleCheckBox("IT_BEHAVE-SELECT", VALUE="`j`", "`if (IT_BEHAV-SELECT[j].selected)` checked `end`"
    )`</b>  ),
    the checkbox values are still not updated.
    My Business HTML and Javascript is not very good, please help.
    Your assistance will be much appreciated.
    Regards
    Liza-Marie

    Hi,
    I tried
    `if (IT_BEHAV-SELECT[j]=='X')`checked`end`
    but it is still not working. I am not sure <i>where</i> it should be inserted...? I added it inside the checkbox tag as follows:
    <b>`SAP_TemplateTableCellBegin(subtype="NONEDIT1")` `SAP_TemplateSimpleCheckBox("IT_BEHAVE-SELECT", VALUE="`j`", "`if(IT_BEHAV-SELECT[j].selected)` checked `end`")`</b>
    as well as before and after this tag, without results.
    The tag SAP_TemplateSimpleCheckbox has the parameter <i>onclick</i>. I suppose this can be used to call a javascript function to control the checkbox values. I'm currently investigating this option, not that my javascript is any good!
    If the input fields of length 1 is used inside the loop, would it still work like a checkbox? I mean, can the user input any character? Do you perhaps have example code for this?
    Unfortunately I cannot debug on the ITS at this stage since I dont have access to the ITS server and it would take too long to get access or arrange for debugging to be set up.
    Thanks for the help so far!
    Regards
    Liza-Marie

  • Values not updated in CRM ,CRM_BADI_BUPA_MOBILE_CHANGE for Sybasemobile

    Hi All,
    We are unable to make changes in CRM
    Implemented the Change BADI CRM_BADI_BUPA_MOBILE_CHANGE  (For language and timezone fields).
    please check my previous post.
    Implementing  CRM_BADI_BUPA_MOBILE_CHANGE for Sybasemobile
    On mobile made changes for these fields ,checked in DOE ,CE structures ,they are not updated with new values.
    checked the FM CRM_BUPA_MOBILE_CHANGE ,BADI is getting triggerd.
    How the dat flows ..mobile->doe ->crm ?(for update values)?
    Thanks,
    Anitha.

    Hi siva,
    Thanks for the information.
    data : ls_address TYPE bapibus1006_address,
    CALL FUNCTION 'BUPA_ADDRESS_READ_DETAIL'
          EXPORTING
            iv_partner           =ls_ce_bupa_hdr-partner
            iv_xaddress           = 'X'
          IMPORTING
            es_address            = ls_address
          EXCEPTIONS
            no_partner_specified  = 1
            no_valid_record_found = 2
            OTHERS                = 3.
    loop at ce_bupa_header into ls_ce_bupa_hdr.
        IF ls_ce_bupa_hdr-FIELD_NAME = 'LanguageKey'.
          ls_address-languiso =  ls_ce_bupa_hdr-FIELD_VALUE.
        elseIF ls_ce_bupa_hdr-FIELD_NAME = 'ZTIME_ZONE'.
          ls_address-time_zone = ls_ce_bupa_hdr-FIELD_VALUE.
        endif.
          endloop.
    CALL FUNCTION 'BUPA_ADDRESS_CHANGE'
      EXPORTING
         IV_PARTNER                      =ls_ce_bupa_hdr-partner
          IV_PARTNER_GUID                 =
          IV_ADDRNUMBER                   =
          IV_ADDRGUID                     =
      IS_ADDRESS                      =
           IS_ADDRESS_X                    =ls_address
          IV_DUPLICATE_MESSAGE_TYPE       =
          IV_ACCEPT_ERROR                 = ' '
    U mean to say this?.
    Will try executing and come back.
    Thanks.
    Anitha.

  • Values not updating in PCA

    Dear All,
    Here i need small clarification on PCA. in my scenario(ECC 6.0) the balance sheet items(g/l's) the amount is not updating in PCA tables (i.e GlPCA) it means line in 2nd line item value is not updating in totals table
    Pls advise me
    Thanks
    Sudhan

    Hi Sudhan,
    Please refer to the note 180906 for Balance sheet accounts whose balances are transfered periodically to PCA. In such case,the update logic for total table:GLPCT and line item table:GLPCA is as
    explained in the note. And if you drill down in such total bal report: i.e. 8A2N,the line items are different with the total amount.
    regards
    Waman

  • VALUES NOT UPDATED IN EXCISE INVOICE

    hi  gurus ,
                     well all the settings  to my knowledge are correct  for CIN customization  , but the excise values are not updated  in excise invoice .the values are 0 " . can ne1 pl help ? dts  top priority .

    Hi,
    Spro>Logistics u2013 General>Tax on Goods Movements>India>Business Transactions>Specify Which Movement Types Involve Excise Invoicesu2014here check for movt type 122 which register is maintained once appropriate register is maintained there then system will update the same.
    Or even you can try J1I5 update register with movt type 122 & enter material document (return delivery material document no) & classification IPD (Issued for clearance/Removal on payment of duty) & select the correct radio button of register. Once update the register then Extract data for excise registers Using J2I5.
    It will update both the data in the register
    Rgs

Maybe you are looking for

  • How can I change the color of chart in webi report

    Hi :   I create one Webi report including one table and chart  In BO 4.0. The chart  display  the relationship between sales-amount and profit amount . I do not want to use the default color but want to specify the red color for sales-amount and yell

  • I-Trigue L3800 2.1 settings

    Hi there - Newbie needing help I've bought the above speakers and they only play out of one speaker. I've unloaded the drivers and reloaded via the web for the most uptodate. However, when i go into control panel / sounds / highlight speakers then co

  • HP G62-120ey RAM problem.

    Recently i bought a kingston 8gb ddr3 sodimm ram plate and replaced the two stock ram plates. But after powering the laptop on - it crashes. Says, that i have to check my hardware. Before buying the ram i did a little research and found out, that my

  • Where can I buy an ipad 2 dock connector that has a release on it?

    Hi all, I'm looking for a dock connector for the ipad 2 that has a "release" or locking mechanism in it. We do a lot of presentations, and the normal ones fall out constantly even when taping them up. I know they do exist as i've seen them before, bu

  • New Forum for Mobile Sales

    Hi There, I have just been involved in a European implementation of SAP CRM 4.0 with a rollout of the Mobile Sales Application to 250 laptops. As this falls outside 'NetWeaver' at the moment I found that we were breaking new ground in terms of some o