If at Firstyo Udo Nt Succeed Try Try Again

  1. #1

    Sandcastle is offline

    Registered User


    Question Why practise some Excel documents Not allow me to Undo/Redo when using THIS Macro?

    Hello Anybody,

    Some of my Excel files work perfectly in terms of undo/redo, while others just cannot use that feature. I took a stroll through the internet looking for the respond, but the problems that I plant seemed to point to the application losing its ability, which was resolved with a registry edit/update/change. I don't remember that's the case here because I Tin disengage is SOME documents.

    Later some investigation with my problem documents I have found that THIS Macro is the one affair all my undo-complimentary documents take in common:
    http://youtu.be/bGjqDGF7xaM

    Does anyone know how to gear up this?

    Cheers.


  2. #2

    zumbalj is offline

    Forum Contributor


    Re: Why practise some Excel documents NOT allow me to Undo/Redo when using THIS Macro?

    I am not able to access youtube from this estimator, so I don't know about the macro specifically. I practise know that one time a macro is run, yous can't disengage anything yous did before it was run (it basically resets that listing of deportment to nothing). I would guess that the macro runs automatically fairly frequently in the background, which would crusade what you lot're seeing.

    <--- If you lot like the answer, printing *.


  3. #3

    Sandcastle is offline

    Registered User


    Re: Why practice some Excel documents Not allow me to Undo/Redo when using THIS Macro?

    Quote Originally Posted by zumbalj View Post

    I practice know that one time a macro is run, you tin can't undo anything you lot did before it was run (information technology basically resets that list of deportment to nothing). I would guess that the macro runs automatically adequately frequently in the background, which would crusade what you lot're seeing.

    Wow, that seems silly. I would await the operations of the Macro to be separate from the history of the document's actions. I come from the world of graphic design so I am used to things like Adobe'south History pallets.

    What this Macro is doing is highlighting the current line, so your clarification explains what's going on. Hither are the instructions that I wrote to a assist file, created from the video'southward instructions:

    Highlight Selected Cell�s Entire Row (Via Macro, in Excel 2010)
    Source: http://www.youtube.com/sentry?v=bGjqDGF7xaM
    1. Click on FORMULAS (tab)
      1. Click on DEFINE NAME (push), then enter:
        Proper name: ActiveRow
        REFERS TO: =one
    2. Click on Provisional FORMATTING (button in Habitation tab)
      1. Click on MANAGE RULES�
      2. Click on NEW Rule�
      3. Choose USE A FORMULA TO Make up one's mind WHICH CELLS TO FORMAT
      4. Enter this formula:
      5. Click on FORMAT (button) and mode how you desire the highlighted row to look
      6. Accept the appearance (OK)
      7. Accept the formula (OK)
      8. In your list of rules ensure that this dominion applies to:
    3. Click on Developer (tab)
      1. Click on VISUAL BASIC (button)
      2. Double-click on THIS WORKBOOK (in list on left)
      3. Click on GENERAL (1st of 2 menus on the newly opened right side) and choose WORKBOOK
      4. Click on OPEN (2nd of the 2 menus) and choose SHEETSELECTIONCHANGE
      5. Select all of the lawmaking in this window and supervene upon it with:
    4. Close the code window (Visual Basic editor)
    5. Save the document as a MACRO-ENABLED WORKBOOK (*.XLSM)
      • Note: Apparently you volition lose the power to Disengage equally the Macro resets the listing of actions.

  4. #four

    zumbalj is offline

    Forum Contributor


    Re: Why exercise some Excel documents Not allow me to Undo/Redo when using THIS Macro?

    Does that seem like it might be your solution with the mode the workbook is used, or do we need to try to think of something else that might cause this?

  5. #five

    Sandcastle is offline

    Registered User


    Re: Why do some Excel documents NOT permit me to Disengage/Redo when using THIS Macro?

    Quote Originally Posted past zumbalj View Post

    Does that seem like it might be your solution with the way the workbook is used, or do nosotros demand to try to think of something else that might crusade this?

    I am in the process of duplicating the workbook and removing the Macro. I'll report back in a few moments. Due to the size of my workbooks, this row highlighting is very useful.

  6. #6

    Sandcastle is offline

    Registered User


    Re: Why practice some Excel documents NOT allow me to Undo/Redo when using THIS Macro?

    Quote Originally Posted past Sandcastle View Post

    I am in the process of duplicating the workbook and removing the Macro. I'll written report dorsum in a few moments. Due to the size of my workbooks, this row highlighting is very useful.

    OK, only removed the Macro and BLAM: Undo works over again.
    Is there another way to accept row highlighting without losing disengage?
    Here is my file, redacted:
    Highlight Rows.xlsm

  7. #seven

    zumbalj is offline

    Forum Correspondent


    Re: Why do some Excel documents Non allow me to Disengage/Redo when using THIS Macro?

    Without making it a manual process, none that I am aware of (although I'm the start to admit, I don't know everything, so it IS nevertheless possible).

  8. #eight

    Re: Why do some Excel documents NOT let me to Undo/Redo when using THIS Macro?

    I think to get this to work without a macro you would need a way of returning any the selected cell is, you tin can use something like:
    =CELL("row")
    which sort of gives you the activerow only it won't change by option, y'all would need to actually get excel to recalculate for it to piece of work (i.e. press enter on a cell or strength calculate CTRL ALT F9.

    You could then replace your conditional formatting with:
    =if(Cell("row")=row(A1),True,False)

    just again, you would need to really recalculate - it won't change with selection.

    I'm not sure how you would become about getting it to modify with selection without using a macro.

    Edit: Actually, I don't recollect that the macro will "break" the undo history if you just go it force calculation. Then change your provisional formatting to:
    =if(Cell("row")=row(A1),True,False)
    and your macro to

    and that should work ok, note - you don't demand the named range bit in this case.

    Final edited past ragulduy; 07-15-2013 at 08:57 AM.

  9. #9

    Sandcastle is offline

    Registered User


    Re: Why do some Excel documents Not allow me to Undo/Redo when using THIS Macro?

    Quote Originally Posted past yudlugar View Post

    Edit: Actually, I don't think that the macro will "break" the disengage history if yous just get it forcefulness calculation. And so alter your conditional formatting to:
    =if(Cell("row")=row(A1),True,Fake)
    and your macro to

    and that should work ok, notation - you don't need the named range bit in this instance.

    I simply tried this. I replaced the VB to what you supplied, and then replaced the Conditional Formatting to what yous provided. No love. Would you mind trying information technology in my excel doc, so that I can run into what y'all did?

    Cheers


  10. #x

    Re: Why do some Excel documents NOT allow me to Undo/Redo when using THIS Macro?

    Sad, I didn't realise the macro was in the thisworkbook object. Delete the existing macro you had and and so put the new i in the "Sheet1 (On)" object.

    I've tried it on your example workbook and it seems to be ok.


  11. #xi

    Sandcastle is offline

    Registered User


    Re: Why do some Excel documents NOT allow me to Undo/Redo when using THIS Macro?

    Thank you for your assistance. I am not entirely sure that I am doing it correctly so I've uploaded what I did.
    Highlight Rows v2.xlsm

  12. #12

    Re: Why practise some Excel documents NOT let me to Undo/Redo when using THIS Macro?

    You are near there, you need to put the code in the worksheet, not the workbook in the vba editor: V3.xlsm

  13. #13

    Sandcastle is offline

    Registered User


    Re: Why do some Excel documents NOT allow me to Disengage/Redo when using THIS Macro?

    Quote Originally Posted by yudlugar View Post

    You are almost there, y'all need to put the code in the worksheet, not the workbook in the vba editor: Attachment 250289

    Oh geez! I didn't DOUBLE click on the worksheet so I thought I pasted information technology in that location! Duh!

    Thanks, I appreciate information technology. Problem SOLVED!


  14. #14

    Re: Why practice some Excel documents Not permit me to Undo/Redo when using THIS Macro?

    No problem, it was an interesting problem and it's actually quite a corking pull a fast one on. Might start using it myself sometimes.

  15. #15

    Sandcastle is offline

    Registered User


    Re: Why do some Excel documents Non allow me to Undo/Redo when using THIS Macro?

    Quote Originally Posted by yudlugar View Post

    No problem, it was an interesting problem and it's actually quite a great play tricks. Might starting time using information technology myself sometimes.

    Information technology might be too soon to celebrate. I've updated all my documents to reverberate this new method and it indeed does enable me to undo, all the same I cannot maintain a pick. Example, click a jail cell, or range and so copy information technology. Y'all get the "marching ants" running effectually it, but as you click something else, you lose the pick.

    Strangely, it only happens in my full-scale documents and not the test file nosotros created here. Clearly I accept a conflict.


  16. #xvi

    Re: Why practice some Excel documents Non allow me to Undo/Redo when using THIS Macro?

    Try irresolute the macro line
    to
    ?

  17. #17

    zumbalj is offline

    Forum Correspondent


    Re: Why do some Excel documents Non allow me to Disengage/Redo when using THIS Macro?

    Would it assist if you lot added lines to the lawmaking to define what's selected at the start of the macro as a range, and at the end, tell it to select that range once more?

  18. #xviii

    Re: Why do some Excel documents NOT allow me to Disengage/Redo when using THIS Macro?

    forcing a calculation clears the clipboard. I reckon you take two options
    one lock the clipboard, calculate then close the clipboard. this will allow you to paste, merely only every bit values
    2 skip the calculation if the awarding is in cut/copy mode

    Josie

    if at first you don't succeed try doing information technology the style your wife told you to


  19. #nineteen

    Re: Why do some Excel documents NOT permit me to Undo/Redo when using THIS Macro?

    Did you lot attempt using .calculationfull? When I tried it using .calculation cleared the clipboard but .calculationfull did not.

  20. #20

    Sandcastle is offline

    Registered User


    Re: Why do some Excel documents Non allow me to Undo/Redo when using THIS Macro?

    Quote Originally Posted by yudlugar View Post

    Effort irresolute the macro line to

    I just did that and was able to paste, with formatting too.

    Excel has been behaving oddly since this change of code though. Like it's trying to function on 1MB of RAM.


  21. #21

    Re: Why do some Excel documents NOT allow me to Undo/Redo when using THIS Macro?

    If you've got a large spreadsheet I imagine it would, you are forcing information technology to recalculate every cell every time y'all change selection...

  22. #22

    Sandcastle is offline

    Registered User


    Re: Why do some Excel documents NOT allow me to Undo/Redo when using THIS Macro?

    Human, this is a lot of fuss over highlighting a row, lol

  23. #23

    Re: Why do some Excel documents NOT allow me to Undo/Redo when using THIS Macro?

    plus calculatefull will recalculate all open workbooks

  24. #24

    Re: Why exercise some Excel documents NOT allow me to Undo/Redo when using THIS Macro?

    Maybe integrating what Joseph suggested:
    might be slightly more cpu-friendly

  25. #25

    Sandcastle is offline

    Registered User


    Re: Why do some Excel documents Not allow me to Undo/Redo when using THIS Macro?

    Thanks everyone.
    I'm going to work with this update for a while and see how things work out through the day.

  26. #26

    Re: Why do some Excel documents Not allow me to Undo/Redo when using THIS Macro?

    I reckon all the cf is gonna dull everything downwards anyway-the price would outweigh whatever benefit for me ;-)

  27. #27

    Sandcastle is offline

    Registered User


    Re: Why exercise some Excel documents Non permit me to Undo/Redo when using THIS Macro?

    It may get to that signal, indeed. The row highlight is very helpful to my workflow, just if information technology cripples me then apparently I'll accept to revert back to SHIFT + SPACEBAR.

  28. #28

    Peter_Excel is offline

    Registered User


    Re: Why exercise some Excel documents Non allow me to Disengage/Redo when using THIS Macro?

    I just came accros this thread and it'due south exactly what I was looking for, keen solution. The but problem I'm having is if I have 2 workbooks open it calculates both and highlights the same row# on both. Is there a mode to merely summate the active workbook active sheet and then the last highlighted row remains unchanged on the other open up workbook?

  29. #29

    Re: Why do some Excel documents NOT permit me to Undo/Redo when using THIS Macro?

    Administrative Note:

    Welcome to the forum.

    Nosotros are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon go confusing when answers refer to item cells/ranges/sheets which are unique to your mail and not relevant to the original.

    Delight see

    Forum Rule #four about hijacking and start a new thread for your query.

    If you are non familiar with how to start a new thread see the FAQ: How to offset a new thread

    Trevor Shuttleworth - Excel Help

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

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


  30. #30

    eagle4x is offline

    Registered User


    Re: Why do some Excel documents NOT permit me to Undo/Redo when using THIS Macro?

    I had aforementioned problem. I saved the file every bit Excel Workbook and then "undo" started working.

cokerfroutichfuld.blogspot.com

Source: https://www.excelforum.com/excel-general/938319-why-do-some-excel-documents-not-allow-me-to-undo-redo-when-using-this-macro.html

0 Response to "If at Firstyo Udo Nt Succeed Try Try Again"

Publicar un comentario

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel