Перейти до основного матеріалу

Як змигнути або зминути текст вказаної комірки в Excel?

Для того, щоб зробити певну клітинку видатною на вашому аркуші, як щодо миготіння тексту цієї комірки? У цій статті буде показано метод мигання тексту певної комірки в Excel.

Блимає або блимає текст вказаної комірки з кодом VBA


Блимає або блимає текст вказаної комірки з кодом VBA

Будь ласка, виконайте наступні дії, щоб блимати текстом вказаної комірки в Excel.

1. прес інший + F11 клавіші одночасно, щоб відкрити Microsoft Visual Basic для додатків вікна.

2 В Microsoft Visual Basic для додатків вікна, натисніть Insert > Модулі. Потім скопіюйте та вставте наступний код у вікно коду.

Код VBA: Блимає текст зазначеної комірки в Excel

Sub StartBlink()
'Updated by ExtendOffice 20181010
    Dim xCell As Range
    Dim xTime As Variant
      On Error Resume Next
    Set xCell = Range("Sheet2!A1")
  On Error Resume Next
   
        If xCell.Font.Color = vbRed Then
            xCell.Font.Color = vbWhite
        Else
            xCell.Font.Color = vbRed
        End If
    xTime = Now + TimeSerial(0, 0, 1)
    Application.OnTime xTime, "'" & ThisWorkbook.Name & "'!StartBlink", , True
End Sub

примітки: у цьому коді VBA аркуш2 та А1 вказують, що текст у комірці А1 аркуша2 буде блимати в поточній книзі.

3 Натисніть кнопку інший + Q клавіші одночасно, щоб закрити Microsoft Visual Basic для додатків вікна.

Тепер вам потрібна кнопка для запуску та зупинки мигання.

4. клацання Розробник > Insert > Кнопка (контроль форми). Дивіться знімок екрана:

5. Намалюйте на своєму аркуші кнопку, а потім - Призначити макрос спливає діалогове вікно, натисніть StartBlink в Macro ім'я , а потім клацніть на OK кнопку. Дивіться знімок екрана:

6. Клацніть правою кнопкою миші на вставлену кнопку та натисніть редагування тексту з меню, що клацне правою кнопкою миші. Потім змініть текст кнопки на потрібний вам текст, наприклад, Пуск / Зупинка блимає.

Відтепер при натисканні на кнопку текст клітинки А1 починає блимати. І при повторному натисканні кнопки текст комірки А1 перестає блимати.

Найкращі інструменти продуктивності офісу

🤖 Kutools AI Aide: Революціонізуйте аналіз даних на основі: Інтелектуальне виконання   |  Згенерувати код  |  Створення спеціальних формул  |  Аналізуйте дані та створюйте діаграми  |  Викликати функції Kutools...
Популярні функції: Знайдіть, виділіть або визначте дублікати   |  Видалити порожні рядки   |  Об’єднайте стовпці або клітинки без втрати даних   |   Раунд без Формули ...
Супер пошук: VLookup за кількома критеріями    Багатозначний VLookup  |   VLookup на кількох аркушах   |   Нечіткий пошук ....
Розширений розкривний список: Швидке створення випадаючого списку   |  Залежний спадний список   |  Виберіть розкривний список, що вибирається ....
Менеджер колонок: Додайте конкретну кількість стовпців  |  Перемістити стовпці  |  Перемкнути статус видимості прихованих стовпців  |  Порівняйте діапазони та стовпці ...
Особливості: Фокус сітки   |  Перегляд дизайну   |   Велика панель формул    Диспетчер робочих книг і аркушів   |  Бібліотека ресурсів (автотекст)   |  Вибір дати   |  Об’єднайте робочі аркуші   |  Шифрування/розшифрування клітинок    Надсилайте листи за списком   |  Супер фільтр   |   Спеціальний фільтр (фільтр жирний/курсив/закреслений...) ...
Топ-15 наборів інструментів12 текст Tools (додати текст, Видалити символи, ...)   |   50 + Графік типи (діаграма Ганта, ...)   |   40+ Практичний Формули (Розрахуйте вік на основі дня народження, ...)   |   19 вставка Tools (Вставте QR-код, Вставити зображення зі шляху, ...)   |   12 Перетворення Tools (Числа до слів, Валютна конверсія, ...)   |   7 Злиття та розділення Tools (Розширені комбіновані ряди, Розділені клітини, ...)   |   ... і більше

Покращуйте свої навички Excel за допомогою Kutools для Excel і відчуйте ефективність, як ніколи раніше. Kutools для Excel пропонує понад 300 додаткових функцій для підвищення продуктивності та економії часу.  Натисніть тут, щоб отримати функцію, яка вам найбільше потрібна...

Опис


Вкладка Office Передає інтерфейс із вкладками в Office і значно полегшує вашу роботу

  • Увімкніть редагування та читання на вкладках у Word, Excel, PowerPoint, Publisher, Access, Visio та Project.
  • Відкривайте та створюйте кілька документів на нових вкладках того самого вікна, а не в нових вікнах.
  • Збільшує вашу продуктивність на 50% та зменшує сотні клацань миші для вас щодня!
Comments (27)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Sheet name Summary and column O

i would like to have a code to make the cell flash red/white on due date. Can someone please help?
This comment was minimized by the moderator on the site
Hi Malek,
The user Sanjeev Raghavan asked a question similar to yours, you can check the replies and see if it solves your problem.
@Sanjeev Raghavan
This comment was minimized by the moderator on the site
is it possible to make it without a button and auto ran?
This comment was minimized by the moderator on the site
Thank you Crystal. Let me try and get back to you.
This comment was minimized by the moderator on the site
Hello,
I am looking for solution to flash / blink a range of cells approaching a future date, say in one week. I mean something like a purchase order delivery date is 30 August. I would like to start flashing the cells by 25th August onwards and even after 30 August till it is delivered.
Can someone give me a solution?
Thank you,
Sanjeev.
This comment was minimized by the moderator on the site
Hi Sanjeev Raghavan,
The following VBA code can do you a favor. In the code, you need to change Sheet5!D2:D5 to the sheet name and the range you want to blink.

Sub StartBlink2()
'Updated by ExtendOffice 20220830
Dim xCell As Range
Dim xTime As Variant
Dim xRg As Range
Dim xWb As Workbook
On Error Resume Next
Dim xToday
Set xCell = Range("Sheet5!D2:D5") 'If there are spaces in your sheet name, enclose the sheet name in single quotes. If no space exists, enter the sheet name without the signe quotes
'On Error Resume Next
xToday = Now()
For Each xRg In xCell
If (xRg - xToday > -1) And (xRg - xToday <= 5) Then
If xRg.Font.Color = vbRed Then
xRg.Font.Color = vbWhite
Else
xRg.Font.Color = vbRed
End If
Else
xRg.Font.Color = vbBlack
End If
Next
Set xWb = xCell.Worksheet.Parent
xTime = Now + TimeSerial(0, 0, 1)
Application.OnTime xTime, "'" & xWb.Name & "'!StartBlink2", , True
End Sub
This comment was minimized by the moderator on the site
Hi I need to do the same for the duplicate cell value in selected column where cell value will blink if the duplicate value appeared in excel
This comment was minimized by the moderator on the site
how can i create flash blink for my time sheet .where the cell contain time above 10 hours .please suggest
This comment was minimized by the moderator on the site
Hi jass,
The following VBA code may solve your problem. Please give it a try.
Don't forget to change the sheet name and the hours range in the code.

Sub StartBlink()
'Updated by ExtendOffice 20220707
Dim xCell As Range
Dim xTime As Variant
Dim xRg As Range
Dim xWb As Workbook
On Error Resume Next
Set xCell = Range("'blinking cells'!D2:E27") 'If there are spaces in your sheet name, enclose the sheet name in single quotes. If no space exists, enter the sheet name without the signe quotes
'On Error Resume Next
For Each xRg In xCell
If xRg >= TimeValue("10:00:00") Then
If xRg.Font.Color = vbRed Then
xRg.Font.Color = vbWhite
Else
xRg.Font.Color = vbRed
End If
Else
xRg.Font.Color = vbBlack
End If
Next
Set xWb = xCell.Worksheet.Parent
xTime = Now + TimeSerial(0, 0, 1)
Application.OnTime xTime, "'" & xWb.Name & "'!StartBlink", , True
End Sub
This comment was minimized by the moderator on the site
how to make flashing specific cell containing specific Text only ?
This comment was minimized by the moderator on the site
not working,

Please help
This comment was minimized by the moderator on the site
when protect the sheet this code not working
This comment was minimized by the moderator on the site
hi, i need help in google sheets..

I need an entire row to blink if F3:F1001 contains the "STAT". the entire row should be in orange but also blinking until the the column W3:W1001's checkbox is ticked.

is it possible? can you help? pleaseeeeeeeeeeeeeee
This comment was minimized by the moderator on the site
Hi mekka,
Sorry can't help you with that. Thank you for your comment.
This comment was minimized by the moderator on the site
How do i change this to sheet 1?
This comment was minimized by the moderator on the site
Hi Sam,
If you want to make cell A1 in Sheet1 or other specific worksheet blinking, please add "Sheet1!" or other worksheet name before the cell address. See the below code line:

Set xCell = Range("Sheet1!A1")
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations