+ Reply to Thread
Results 1 to 9 of 9

Using vba code with undo option

  1. #1
    Forum Contributor
    Join Date
    12-11-2014
    Location
    dubai
    MS-Off Ver
    2010
    Posts
    142

    Using vba code with undo option

    Hi
    I have this code in one of my sheet
    Please Login or Register  to view this content.
    The problem is once i put it in my sheet, The undo button greys out
    Is there any possibility to use the undo button after having this code in the sheet?
    Can anyone alter the vba code so as to enable the undo click?

    Thanks in advance!!

  2. #2
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Using vba code with undo option

    You can't use undo button everytime you execute a macro.

    Read this;http://www.jkp-ads.com/Articles/UndoWithVBA00.asp
    Last edited by Blokeman; 01-22-2015 at 12:39 AM.
    Please click the * Add Reputation if this helps
    If solved remember to mark Thread as solved

    "I'm glad to help and this is not meant to sound smart, but either you have super-human vision to see all those controls cleared one by one with the code I posted, or your computer is really slow."

  3. #3
    Forum Contributor
    Join Date
    12-11-2014
    Location
    dubai
    MS-Off Ver
    2010
    Posts
    142

    Re: Using vba code with undo option

    yeah but i read that its possible if u alter the code, since i know only basic of vba, is it possible to later the above code??

  4. #4
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    423

    Re: Using vba code with undo option

    Try this:

    Please Login or Register  to view this content.
    And then put this in a Standard Module (it won't work if you put it with the worksheet code above).
    Please Login or Register  to view this content.
    Last edited by mgs73; 01-22-2015 at 01:12 AM.

  5. #5
    Forum Contributor
    Join Date
    12-11-2014
    Location
    dubai
    MS-Off Ver
    2010
    Posts
    142

    Re: Using vba code with undo option

    hey sorry i dont know much about vba, should i use both the codes at once? what is standard module?
    Last edited by Masa1989; 01-22-2015 at 01:15 AM.

  6. #6
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    423

    Re: Using vba code with undo option

    should i use both the codes at once?
    Yes.

    what is standard module?
    In the VBA Window on the Left Side, look for something that says 'Microsoft Excel Objects'. Right-click there and select Insert then Module. This is a 'standard' module as opposed to a workbook or worksheet module.

  7. #7
    Forum Contributor
    Join Date
    12-11-2014
    Location
    dubai
    MS-Off Ver
    2010
    Posts
    142

    Re: Using vba code with undo option

    hey yeah i found, do i use the above codes one below each other??

  8. #8
    Forum Contributor
    Join Date
    12-11-2014
    Location
    dubai
    MS-Off Ver
    2010
    Posts
    142

    Re: Using vba code with undo option

    he y i was tryin this code, it only unhides the hidden columns and undo in general doesnt get enabled

  9. #9
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    423

    Re: Using vba code with undo option

    In that case, I am afraid what you are asking for is impossible.

+ 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. When I add Validation VBA code, I cannot undo
    By jgema in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2013, 04:05 AM
  2. [SOLVED] VBA Excel If Then Statement doesn't "undo" when user corrects selected option
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-27-2012, 09:19 AM
  3. (CHANGED) Macro Undo Code
    By dmeinder in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2012, 11:16 AM
  4. Code is stopping undo
    By NeilE in forum Excel General
    Replies: 2
    Last Post: 03-13-2011, 11:24 AM
  5. [SOLVED] UNDO in VBA code???
    By Joel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2005, 03:06 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