+ Reply to Thread
Results 1 to 5 of 5

Record of Excel commands

  1. #1
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Record of Excel commands

    This code reflects the the changes made to the worksheet and displays a message box of what was done.
    Apparently the information is stored in Application.CommandBars("Standard").Controls("&Undo").List(1).
    I have used it elsewhere and it has caused me issues, since at the start there seems to be "nothing" or "no information" in this variable.
    So, if I do something in the worksheet and then press the UNDO button, I get an error message.
    I've tried to test for vbNullString and "" but nothing works. If there is nothing, it should Exit so there is no error message.

    THIS WORKBOOK
    Please Login or Register  to view this content.

    CLASS MODULE
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Record of Excel commands

    Hi there,

    Will a simple "ignore error" approach help?

    Please Login or Register  to view this content.

    Regards,

    Greg M

  3. #3
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Record of Excel commands

    Greg, thanks for assisting, this will work.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,010

    Re: Record of Excel commands

    .
    Where is Excel getting the statement for the MsgBox ?

    WhatExcelDid is not dimmed nor is it included in a "Set WhatExcelDid = blah blah blah" statement.

    ????

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Record of Excel commands

    Hi again,

    Many thanks for your feedback and also for the Reputation increase - much appreciated!

    You're welcome - glad I was able to help.

    Best regards,

    Greg M

+ 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] excel navigate records if end record display end of record
    By aarona in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2017, 06:04 AM
  2. [SOLVED] Record Macro function does not record certain commands
    By m185945 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-01-2013, 11:02 AM
  3. Macro Recording Chart Format commands missing all important commands!!!!
    By nounours in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-05-2013, 09:20 PM
  4. Add new record to excel userform below the last record
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-27-2013, 02:49 AM
  5. Replies: 1
    Last Post: 11-16-2012, 09:25 AM
  6. Command Buttons for Viewing Record, Next Record and Previous Record
    By david1987 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2012, 06:30 AM
  7. Replies: 1
    Last Post: 01-17-2012, 10:47 AM

Tags for this Thread

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