Forum Discussion

Tai Excel's avatar
Tai Excel
Copper Contributor
May 06, 2018

Excel Macro Recording - Generate Wrong VBA

Hi,

 

need helps here.

 

Background

I have prior Macro recording and VBA experience in Excel. After I install and active Office 365 ProPlus on my new machine (ThinkPad E480), the Macro recording generate wrong VBA Code. There are not additional add-in installed on this Office, with all default setting.

 

To Replicate This Error (only in my machine)

1. Start Macro Recording

2, Click on Cell B4

3, The Code generated is Range("B4").ErrorString instead of Range("B4").Select

 

 

Troubleshooting Performed

Done Online Repair and the problem still persist.

All using default setting in Office.

 

 

Appreciate your advise on how to rectify this. Thanks!

 

7 Replies

  • Having a similar problem, that when I try to record a Macro, VBA does not do what I expect.  For instance, I select a range, but VBA records it as Range("A5").DataFields.  Unexpected and disappointing.

     

    Per this thread, I'm reinstalling Office.  Very inconvenient because I use Excel every single day.  Will edit/update if reinstalling fixes my problem. EDIT: Reinstalling worked.

  • arianne.gcruz's avatar
    arianne.gcruz
    Copper Contributor
    Hi! I also experience the same thing. Instead of copy, paste, etc, my "record macro" produces vba that says "delete". I don't see the feedback button in my excel 2016. What can I do to correct it? Thank you!
    • Tai Excel's avatar
      Tai Excel
      Copper Contributor

      it's now resolved via simple method below

       

      1. uninstall Office (don't borthered with online repair)

      2. reboot computer

      3. install office with new setup file

       

      hope this helps

      • Amanda Anderson's avatar
        Amanda Anderson
        Copper Contributor

        Hi Tai,

         

        I'm having the same trouble with my new Thinkpad, and even after reinstalling Office, I'm getting the same errors with Excel macros.  Any other suggestions?

    • Haytham Amairah's avatar
      Haytham Amairah
      Silver Contributor

      Hi Arianne,

       

      There is a ribbon tab called Help!

      If you don't find it, right-click the ribbon and select Customize the Ribbon, then find the Help checkbox, and check it.

      If you didn't find it, then it's not available in your version of Excel, in this case, you can ask this https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel which is the best place to get support.

       

      Regards

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Hi Tai,

     

    It seems to be a bug in the macro recorder as there is no property in the Range object called: ErrorString.

    I advise you to report this to Microsoft through Help (Ribbon tab) >> Feedback.

     

    Regards

    • Tai Excel's avatar
      Tai Excel
      Copper Contributor
      used that many times and did not get any helpful response

Resources