change cell colors for 2 seconds

R

ricowyder

Dear users,

I have already a macro running for activecell actvated by ctrl + f. To
ensure my colleagues, that the macro did its job, I would like to
change the color of the cell for 1 or 2 seconds. Can anybody assists?
I recorded a macro and changed the color to yellow and back to 'no
fill'. But the macro is too fast - you don't see anything. Is there a
possibility to define how many seconds the macro should wait between
yellow and no fill?

Thanks a lot for your answers.

Regards,

Rico
 
J

JE McGimpsey

One way:

Const nWAITSECONDS As Long = 2

'Your code here

ActiveCell.Interior.ColorIndex = 6
Application.Wait Now + TimeSerial(0, 0, nWAITSECONDS)
ActiveCell.Interior.ColorIndex = xlColorIndexNone
 
R

ricowyder

One way:

Const nWAITSECONDS As Long = 2

'Your code here

ActiveCell.Interior.ColorIndex = 6
Application.Wait Now + TimeSerial(0, 0, nWAITSECONDS)
ActiveCell.Interior.ColorIndex = xlColorIndexNone





- Zitierten Text anzeigen -

Great. It works. Thanks Bob, thanks JE!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top