[算表] 依游標顯示欄位

看板Office作者 (收PS與MB)時間11年前 (2014/09/01 23:57), 編輯推噓0(004)
留言4則, 2人參與, 最新討論串1/1
直接先用圖解 http://imgur.com/Vvskq2W
滑鼠移到(或點擊)的地方,欄和列可反白 以下如果有幫助的話可參考 已經可以做到點擊的單格改變 但我不知道怎麼延伸到欄和列 -------------------------------------------------------------------------- Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If Application.CutCopyMode = xlCopy Then Me.Paste On Error Resume Next [colorCell].FormatConditions.Delete Target.Name = "colorCell" With [colorCell].FormatConditions ' 設定格式化條件 .Delete .Add xlExpression, , "TRUE" ' 條件(一)內公式為 .Item(1).Interior.ColorIndex = 36 ' .Item(1)等於FormatConditions(1) .Item(1).Font.Bold = True End With End Sub Sub Mouse() End Sub --------------------------------------------------------------------------- -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.168.161.15 ※ 文章網址: http://www.ptt.cc/bbs/Office/M.1409587072.A.388.html

09/02 00:08, , 1F
09/02 00:08, 1F

09/02 00:41, , 2F
Amazing來的...但大大不是用VBA寫的嗎?
09/02 00:41, 2F

09/02 00:43, , 3F
點進去想看VBA 沒有東西?!
09/02 00:43, 3F

09/02 01:07, , 4F
是用VBA寫的,雙擊工作表1就會看到
09/02 01:07, 4F
文章代碼(AID): #1K19U0E8 (Office)
文章代碼(AID): #1K19U0E8 (Office)