SOLVED

How can I use VBA to move my shape and then after a few seconds make it disappear

Brass Contributor

So with help from a similar thread here, I can move the shape as desired, how would I make that shape disappear after a few seconds? And then reappear after another cell selection?

 

So in other words, when I click on a cell, move my shape to that cell, then it disappears after a few seconds. If another cell selection is made, show the shape again at the selected cell and then disappear again.

 

 

3 Replies
best response confirmed by rodsan724 (Brass Contributor)
Solution

@rodsan724 

 

See the attached version. There is code in three modules:

ThisWorkbook - to stop scheduling the HideShape macro when the workbook is closed.

Sheet1 - the Worksheet_SelectionChange event procedure.

Module1 - to declare the dtmNext variable and the HideShape macro.

what is the concern of stop scheduling when the file/workbook is closed?

@rodsan724 

If you don't do that, and if the shape were still visible when you close the workbook, the scheduled macro would reopen the workbook in order to run.

1 best response

Accepted Solutions
best response confirmed by rodsan724 (Brass Contributor)
Solution

@rodsan724 

 

See the attached version. There is code in three modules:

ThisWorkbook - to stop scheduling the HideShape macro when the workbook is closed.

Sheet1 - the Worksheet_SelectionChange event procedure.

Module1 - to declare the dtmNext variable and the HideShape macro.

View solution in original post