+ 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
    Excel 2013
    Posts
    792

    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,416

    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
    Excel 2013
    Posts
    792

    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 2003,2007,2010
    Posts
    29,663

    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 - Excel Aid

    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)

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