+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : undo/redo function missing after enabling macro

Hybrid View

wayneg undo/redo function missing... 06-20-2012, 10:58 AM
wayneg Re: undo/redo function... 06-20-2012, 02:27 PM
shg Re: undo/redo function... 06-20-2012, 03:01 PM
wayneg Re: undo/redo function... 06-21-2012, 02:24 AM
vlady Re: undo/redo function... 06-21-2012, 02:44 AM
  1. #1
    Forum Contributor
    Join Date
    04-29-2012
    Location
    nuneaton, England
    MS-Off Ver
    Office 365
    Posts
    371

    undo/redo function missing after enabling macro

    i have just started using macros so dont know if this the normal or not... i made a mistake and went to undo that mistake and noticed that i couldnt undo as the function was greyed out.

    before enabling the macro the function works.

    is this normal and if so how do i use/create an undo function (using an extra macro or something)

    im currently using a macro shown below.

     Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    
        If Target.Count > 1 Then Exit Sub
        On Error Resume Next
        Application.ScreenUpdating = False
        Select Case Target.Column
        Case 5, 9, 13, 17, 21, 25, 29
            Target.Columns.ColumnWidth = 20
        Case Else
            Range("E:E").ColumnWidth = 1.43
            Range("I:I").ColumnWidth = 1.43
            Range("M:M").ColumnWidth = 1.43
            Range("Q:Q").ColumnWidth = 1.43
            Range("U:U").ColumnWidth = 1.43
            Range("Y:Y").ColumnWidth = 1.43
            Range("AC:AC").ColumnWidth = 1.43
            
        End Select
        Application.ScreenUpdating = True
    End Sub
    cheers in advance

    wayne

  2. #2
    Forum Contributor
    Join Date
    04-29-2012
    Location
    nuneaton, England
    MS-Off Ver
    Office 365
    Posts
    371

    Re: undo/redo function missing after enabling macro

    does anybody know???

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: undo/redo function missing after enabling macro

    When a macro changes the environment (e.g., a cell, a style, a column width, almost anything), the Undo stack is flushed. It's a good reason to think twice before adding macros to a workbook.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    04-29-2012
    Location
    nuneaton, England
    MS-Off Ver
    Office 365
    Posts
    371

    Re: undo/redo function missing after enabling macro

    is there something then i can use as an undo... is there a macro for that???

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: undo/redo function missing after enabling macro

    hello

    i found this link, maybe it could help you..

    http://j-walk.com/ss/excel/tips/tip23.htm
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ 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