Here is what I have so far
Code: Select all
Private Sub CommandButton2_Click()
Dim R As Integer, G As Integer, B As Integer
Dim FLR As String, FLG As String, FLB As String
On Error GoTo EH
FLR = Application.InputBox("Enter Your Desired Red Value", "Adding RGB", Type:=2)
If FLR = "" Then Exit Sub
If FLR >= 255 Then Exit Sub
FLG = Application.InputBox("Enter Your Desired Green Value", "Adding RGB", Type:=2)
If FLG = "" Then Exit Sub
If FLG >= 255 Then Exit Sub
FLB = Application.InputBox("Enter Your Desired Blue Value", "Adding RGB", Type:=2)
If FLB = "" Then Exit Sub
If FLB >= 255 Then Exit Sub
MsgBox "Your Interior RGB Color Selections Are: = " & FLR & ", " & FLG & ", " & FLB
'R = Selection.Interior.Color
'G = Selection.Interior.Color
'B = Selection.Interior.Color
'ActiveCell.Interior.Color = "R, G, B"
EH: Exit Sub
End Sub