Flashing a message

RoyR

Board Regular
Joined
Jan 25, 2012
Messages
62
I was wondering if there is a way to flash a message in a cell when worksheet is opened. I entered the following into the sheet code and it works if I manually activate it, but I would like it to run every time the sheet is accessed.

Option Explicit
Private Sub Flash()
Dim Flash As Integer
For Flash = 1 To 5
Range("A5").Font.ColorIndex = 2
Application.Wait Now + TimeSerial(0, 0, 1)
Range("A5").Font.ColorIndex = 5
Application.Wait Now + TimeSerial(0, 0, 1)
Next
End Sub

The idea is to draw attention to the cells contents before any data is entered or changed on the sheet.
Thanks in advance for any help

Roy
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

RoyR

Board Regular
Joined
Jan 25, 2012
Messages
62
I found a method to make it work but those links you shared with me give new ideas and I will try out those methods also.

Thank you for your time.
 
Upvote 0

hiker95

Well-known Member
Joined
Apr 8, 2009
Messages
17,649
RoyR,

I found a method to make it work

Can you share the link to what you found, or, post the macro code?


If posting VBA code, please use Code Tags - like this:

[code]

'Paste your code here.

[/code]



Thanks for the feedback.

You are very welcome. Glad I could help.

Come back anytime.
 
Upvote 0

RoyR

Board Regular
Joined
Jan 25, 2012
Messages
62
Yes, I would be happy to explain what I did. First I will explain what it was all about so the code will make more sence. It is a little more complex than the code I asked help for. When the worksheet is first opened, it is like a form excluding any data. After data is entered and the worksheet is saved, the data is transfered elsewhere and the worksheet is again blank. Entering data always starts at Cell A10. Periodicly, the format of the data is changed so a reminder of what format to use is written in merged Cell A3:C4 and A5:C6. To remind of any format change, I wanted it to flash when data if first being entered.

The following is the code that did the trick

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Flash As Integer
If Range("A10").Value <> "" Then Exit Sub
If Not Intersect(Target, Range("A10")) Is Nothing Then
For Flash = 1 To 3
Range("A3:A5").Font.ColorIndex = 2
Application.Wait Now + TimeSerial(0, 0, 1)
Range("A3:A5").Font.ColorIndex = 5
Application.Wait Now + TimeSerial(0, 0, 1)
Next
End If
End Sub

This will flash the message a few time when the data is first being entered into cell A10 as a reminder but then no more flashing will happen until the next time the worksheet is opened. I hope my explanation is understandable. Again, thanks for the sugestions I had recieved as I will experment with those ideas also.

Roy
 
Upvote 0

Forum statistics

Threads
1,195,588
Messages
6,010,604
Members
441,558
Latest member
lambierules

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top