Excel 格式化問題

2009-04-03 7:14 pm
我係用緊Excel 2007的.

我想問下, 有沒有辦法教識Excel, 如果個儲存格既字符合我的條件, 果D字或者格仔, 可以出到閃爍的效果? (即一閃一閃果隻)

各位高手, 請指教

回答 (1)

2009-04-13 3:45 pm
✔ 最佳答案


Right-click the sheet tab, select View Code, paste this in:
Private Sub Worksheet_Calculate()
If Range("B8").Value = "" Then
Blink "B10"
Else
Range("B10").Interior.ColorIndex = 0
End If
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
Application.Run Me.CodeName & ".Worksheet_Calculate"
End Sub

Insert a regular module, and paste this in:
Sub Blink(cell As String)
If Range(cell).Interior.ColorIndex = 6 Then
Range(cell).Interior.ColorIndex = 0
Else
Range(cell).Interior.ColorIndex = 6
End If
Application.OnTime Now + 1 / 86400, "doagain"
End Sub
Sub DoAgain()
Application.Run Sheets("Sheet1").CodeName & ".Worksheet_Calculate"
End Sub
http://en.allexperts.com/q/Excel-1059/formulas-blinking-flashing-results.htm
http://www.mrexcel.com/archive/VBA/5889.html


收錄日期: 2021-04-11 17:02:24
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20090403000051KK00311

檢視 Wayback Machine 備份