+ Reply to Thread
Results 1 to 4 of 4

Macro not applying correct value until second attempt

  1. #1
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,394

    Macro not applying correct value until second attempt

    Macro triggered by changing the values in N4

    Please Login or Register  to view this content.
    Code multiplies each value in Col E by N4, shows results in Col G, adjusts Outstanding Balances in Col I, and shows % invoiced in Col H (As there are no "Prior payments" in the example attached, Col H should match N4)

    Problem:: % entered is not what comes out on first attempt. Have to enter it again.
    E.g. Enter 3% in N4, Col H applies 100%, making Cols G and I incorrect. Enter again, Col H now shows correct values of 3%. and Cols G and I are correct).

    Please Login or Register  to view this content.
    Never had this before, and can't see where the "error" can be?

    All solutions, suggestions and alternatives welcome as ever

    Ochimus
    Last edited by Ochimus; 11-10-2019 at 04:31 PM.

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Macro not applying correct value until second attempt

    Please Login or Register  to view this content.
    You should also set Application.EnableEvents = True and then False at end. You only need that in one Sub or the other.

  3. #3
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,394

    Re: Macro not applying correct value until second attempt

    Kenneth,

    Many thanks for prompt response, which I have incorporated into the Code - but sadly they don't seem to have impacted on the actual problem?

    Ochimus

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,319

    Re: Macro not applying correct value until second attempt

    @Kenneth

    You should also set Application.EnableEvents = True and then False at end.
    Should this not be the other way round?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Error 462 - Macro works every 3rd attempt
    By JoePick87 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-24-2019, 07:14 AM
  2. Graph not giving correct results. Y values not applying?
    By HarvardMajesty in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 12-12-2016, 09:37 AM
  3. Attempt to send e-mail via CDO from within spreadsheet macro
    By Gryfphon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2015, 04:55 AM
  4. Macro Attempt for Importing txt data
    By CapnJackSparrow in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-30-2014, 11:30 AM
  5. [SOLVED] Attempt to add array list to macro not working
    By capson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-02-2014, 02:27 PM
  6. [SOLVED] How to get correct values without applying filters
    By SunOffice in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-24-2013, 06:30 PM
  7. Excel Keeps crashing after macro attempt
    By phschris1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-28-2009, 10:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1