Forum Discussion
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
- prestondockery_USIBMCopper Contributor
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.gcruzCopper ContributorHi! 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 ExcelCopper 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 AndersonCopper 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 AmairahSilver 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 AmairahSilver 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 ExcelCopper Contributorused that many times and did not get any helpful response