How would I go about amending this code on the 'InsertRows' macro (Crtl i), so that I don't get a Run-time error '13', when the cancel button is clicked on the dialogue box?
Many thanks...Please Login or Register to view this content.
How would I go about amending this code on the 'InsertRows' macro (Crtl i), so that I don't get a Run-time error '13', when the cancel button is clicked on the dialogue box?
Many thanks...Please Login or Register to view this content.
Hi there,
Try this:
Regards,Please Login or Register to view this content.
Robert
____________________________________________
Please ensure you mark your thread as Solved once it is. Click here to see how
If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post
Try this
Note that J is no longer defined as Long which allows it to take a string value as well. I've added a type argument to the input box to force a number being added.Please Login or Register to view this content.
Martin
Hi Trebor76,
This still gives the same error...
Hi mrice,
This removes the error, however, it also inserts two blank rows above the selected cell (rather than below it as in the original), even when nothing is entered into the dialoue box?
For mrice's solution replace this line...
...with this:Please Login or Register to view this content.
As for my code I'm not sure as it worked fine for mePlease Login or Register to view this content.
Robert
Ooopss
Please Login or Register to view this content.
Hi Trebor76
Weird, tried your code again and yes, it is all working correctly, must have been something I did! You're suggested change to mrice's code also fixed the problem.
Many thanks
Last edited by HangMan; 12-08-2012 at 07:36 PM.
Hi mrice,
Trebor76' tweak fixed your code, plus your revision also works, so many thanks for your help.
Hi mrice,
Trebor76' tweak fixed your code, plus your revision also works, so many thanks for your help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks