==================================================
Sub 列出顏色與索引值()
For i = 1 To 56
Cells(i, 1).Interior.ColorIndex = i
Cells(i, 2).Value = i
Next
End Sub
===================================================
Sub colors56()
'此程式用到十六進位轉十進位的函數Hex2dec,執行前必須在增益集中加入分析工具箱。
'57 colors, 0 to 56
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual 'pre XL97 xlManual
Dim i As Long
Dim str0 As String, str As String
For i = 1 To 56
Cells(i + 1, 1).Interior.ColorIndex = i
Cells(i + 1, 1).Value = "[Color " & i & "]"
Cells(i + 1, 2).Font.ColorIndex = i
Cells(i + 1, 2).Value = "[Color " & i & "]"
str0 = Right("000000" & Hex(Cells(i + 1, 1).Interior.Color), 6)
'Excel shows nibbles in reverse order so make it as RGB
str = Right(str0, 2) & Mid(str0, 3, 2) & Left(str0, 2)
'generating 2 columns in the HTML table
Cells(i + 1, 3) = "#" & str
Cells(i + 1, 4) = "#" & str
Cells(i + 1, 4).Interior.ColorIndex = i
Cells(i + 1, 5).Formula = "=Hex2dec(""" & Right(str0, 2) & """)"
Cells(i + 1, 6).Formula = "=Hex2dec(""" & Mid(str0, 3, 2) & """)"
Cells(i + 1, 7).Formula = "=Hex2dec(""" & Left(str0, 2) & """)"
Cells(i + 1, 8) = "[Color " & i & "]"
Next i
done:
Application.Calculation = xlCalculationAutomatic 'pre XL97 xlAutomatic
Application.ScreenUpdating = True
End Sub
=============================================================
2014年2月21日 星期五
訂閱:
張貼留言 (Atom)
關節卡卡或彈響
關節間產生的潤滑液少,關節摩擦的損耗 髖關節彈響。 一般有兩種情況,第一種是關節外彈響較常見。 發生的主要原因是髂脛束的後緣或臀大肌肌腱部的前緣增厚, 在髖關節作屈曲、內收、內旋活動時,增厚的組織在大粗隆部前後滑動而發出彈響, 同時可見到和摸到一條粗而緊的縴維帶在...
-
================== Range("A1").Select With Selection .HorizontalAlignment = xlLeft '水平對齊 .VerticalAlignment = xl...
-
儲存格 [R1C1]格式,[A1]格式 Cells(列次,欄次).Select Cells(2, "A").Select '2列A欄 Cells(2, 1).Select '2列1欄 Cells.Item(5,”C”...
沒有留言:
張貼留言