I am trying to run the following code
However, the 2nd line produces an error: Run-time error '424': Object required.HTML Code:
Any thoughts or suggestions where this error come from? I have similar code which runs as expected in another macro.
I am trying to run the following code
However, the 2nd line produces an error: Run-time error '424': Object required.HTML Code:
Any thoughts or suggestions where this error come from? I have similar code which runs as expected in another macro.
How is test defined?
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
I did not explicitly define test. This is a temp var for use in the Do..Loop. I tried to define test as both DATE and VARIANT w/ no luck.
is a range. You then check if test is empty. Maybe try defining it as a range.![]()
Please Login or Register to view this content.
Regards, TMS
What value does n have when it fails?
TMS, your suggestion took care of the error. However, even ifis empty, the IF statement executes. I wrote the value of test to an adjacent cell to ensure it was in fact empty.HTML Code:
Maybe:
![]()
Please Login or Register to view this content.
Regards, TMS
TMS, that got it. Thanks for your help
You're welcome. Thanks for the rep.
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
New quick method:
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
Or you can use this way:
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks