I'm interested in whether there is a colored adjacent cells with moving and permanent position memory cells using VBA?
Is there a possibility of using VBA in Excel?
I have four positions,
Please see attach and detailed described the problem.
I'm interested in whether there is a colored adjacent cells with moving and permanent position memory cells using VBA?
Is there a possibility of using VBA in Excel?
I have four positions,
Please see attach and detailed described the problem.
Last edited by Dumy; 01-04-2015 at 05:12 AM. Reason: SOLVED
Sure,
Put this code in the sheet module for the sheet in question.
Then put this code in a normal modulePlease Login or Register to view this content.
Putting this in the ThisWorkbook module will automatically initialize without pushing the button.Please Login or Register to view this content.
Note that the X can push a colored cell off the top or left of the sheet, but it will not push itself off the edge.Please Login or Register to view this content.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
@mikerickson, fantastic, I was not sure that this can be done in VBA, so I did not go into details.
How to reprogram VBA that user can't push the red cell, if in the direction of pushing encounters a black cell containing the letter 'A'
Please you see worksheet "situation1" in attached files
Thank you for reporting and assistance
..........
@mikerickson
If you have time, please
How can I limit the range of cells for pushing red cell.
Therefore, only in a certain range VBA to push works.
example range F2:R25
Please Login or Register to view this content.
Hi,
This is my try, please look at my attached file.
The boundary area is defined by CellMove_BoundaryRange constant (range B2:J12, the purple area)
The cell with its content is "A" is cannot pass-able.
The code will "remember" the previous cell's color and formula (they will be restored if the block is out of the cell)
To start, select cell F3 at sheet "after", then run macro CellMove_Start()
To stop, run macro CellMove_Stop()
Regards
1. I care dog
2. I am a loop maniac
3. Forum rules link : Click here
3.33. Don't forget to mark the thread as solved, this is important
Change the code in the normal module to this and it should work
Note that there can only be one cell that contains only X on the sheet in question.Please Login or Register to view this content.
@karedog
Nice try VBA code, but result that's not what I wanted. Anyway thanks for the occurrence and your desire to help me.
@mikerickson
Thank you for your answers. Basically, this is what I wanted and everything works as I asked. Now I'm going to study your VBA code so that I knew that the next step I have to take.
I have a small problem in a situation where they found two red cells one after the other in the direction of pushing. There would also be blocked by pushing direction.
But, I do not want to bother you, so I'm going to look for the internet for further steps.
Here's my unfinished work that I want to do for me (I am planning to create my own other levels)
regards
Last edited by Dumy; 01-04-2015 at 05:11 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks