Hello,
Can someone fix this code? Which does not include Sheet1 “A1”, Sheet2 “D10” and Sheet3 “F1”.
Thanks.
![]()
Please Login or Register to view this content.
Hello,
Can someone fix this code? Which does not include Sheet1 “A1”, Sheet2 “D10” and Sheet3 “F1”.
Thanks.
![]()
Please Login or Register to view this content.
This was my original code. Thanks.
![]()
Please Login or Register to view this content.
Try this:
![]()
Please Login or Register to view this content.
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
Hi TMS
What is the “option explicit” for?
Does that include in the code?
I also see that “is nothing then” been removed feom the original code. Don’t i need it?
Thanks
Option Explicit ensures that variables are defined.
Do you need the code that has been removed? One good way to find out is put the new code in instead of yours in the Workbook code module and see if it does what you want.![]()
Hi TMS
Your code worked for me. Question, Having the "option explicit" with the code you provided, will this affect my other codes that its in my workbook?
I also tried your code without the "option explicit" and it worked without it but I just don't know how much important it is to be in it.
I am not familiar with this and reading the statement you sent me, but I still did not understand.
Thanks.
It's intended to help you get your code right first time. With it, you must declare your variables which avoids things like misspelling variables, or using a variable that hasn’t been initialised. So, for example, xlUp and x1Up look the same/similar but xlUp is a VBA constant and x1Up doesn’t exist.
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.
Thank You TMS
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks