Hello, all. Select ActiveCell. Monday, September 23, PM. This is a VB. Net only forum. Ask here instead: Excel Developers. There you should also mention in which line the error occurs.
Okay, thanks. I have moved this thread to Excel for Develops forum for better response. Tuesday, September 24, AM. I already made a second thread in the Excel Developers forum, so this will now be a duplicate. Tuesday, September 24, PM. Asadulla, Thank you very much for your reply.
Thanks for your time and help. Even more efficient, you can further limit the change to just AB for that row, something like aircode : If Target.
Thank you, Ker A much more elegant solution than the one I had thrown together! Wednesday, September 25, PM. I have a new problem with this code. Any way to adapt this code to allow for multiple rows being modified? Thanks in advance. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. Not all objects support all properties and methods. This error has the following cause and solution:.
You probably have this error showing in your PC, that you must be certain you possibly can repair it in the simplest manner attainable. Step one to fixing the error is to uninstall the Microsoft Works add-in for Workplace.
This usually causes battle with the Workplace software program. Eradicating it ought to cease any additional battle inside your system.
Sheets 2 Then? What line are you getting the error on? Try 'wksht. Sheets 2 ' — Peicong Chen. If you have a general idea of where your code is breaking, but don't know exactly what line, you can find out one of two ways: run it with the VBA Editor window open it will stop on the line that throws the error , or put a breakpoint click the grey column to the left of where the code is to add a red dot somewhere right before the section you know is throwing the error, then run the entire thing from the top.
Once the code pauses at the breakpoint, press F8 to step into the code, step by step. TylerH you can also use F9 to toggle a breakpoint — Mathieu Guindon. Show 8 more comments. Active Oldest Votes. Sheets 2 Then The Worksheet class doesn't have a default property, so you can't let-coerce that object; VBA is trying to invoke the default member of Worksheet to satisfy the comparison operator, but there's no such member, so error is raised.
You need the Is operator for reference equality: If wksht Is wkbk. Sheets 2 Then Note that this is different from comparing the. Addendum wkbk. Sheets 1. Mathieu Guindon Mathieu Guindon Add a comment.
0コメント