Hello,
This is my first post into this forum. I am trying to follow the rules as best as I can. If I miss any, please let me know.
Idea: I set up a range of cells to show a form when they are double clicked. This form gives the user the choice to pick a color and text from a list. When the user clicks "OK" the form closes and changes the cell based on the user's input (i.e. Red, "N/A"). I want only the double cliked cell to change color and text.
Problem: My code runs fine, but I cannot find a way to let the form change the text of the cell. Only the color is changing. I have tried calling the cell out in the code, but I get an error. I cannot find a way to change the text in the cell. I ran out of ideas.
Code:
Image:
http://postimage.org/image/g98psnlzl/
Thank you for your time,
Kabasauls
This is my first post into this forum. I am trying to follow the rules as best as I can. If I miss any, please let me know.
Idea: I set up a range of cells to show a form when they are double clicked. This form gives the user the choice to pick a color and text from a list. When the user clicks "OK" the form closes and changes the cell based on the user's input (i.e. Red, "N/A"). I want only the double cliked cell to change color and text.
Problem: My code runs fine, but I cannot find a way to let the form change the text of the cell. Only the color is changing. I have tried calling the cell out in the code, but I get an error. I cannot find a way to change the text in the cell. I ran out of ideas.
Code:
Code:
Private Sub CommandButton2_Click()
Dim ColorChosen As String
Dim WordChosen As String
ColorChosen = ColorCmb.Value
WordChosen = LetterCmb.Value
Sheets("Master Copy").Activate
If ColorChosen = "White" Then
Selection.Interior.Pattern = xlNone
ElseIf ColorChosen = "Blue" Then
Selection.Interior.Color = 16777164
ElseIf ColorChosen = "Green" Then
Selection.Interior.Color = 3407718
ElseIf ColorChosen = "Amber" Then
Selection.Interior.Color = 65535
ElseIf ColorChosen = "Red" Then
Selection.Interior.Color = 255
ElseIf WordChosen = "NA" Then
'Selection = "NA"
cell(1, 1).Value = "String"
End If
Image:
http://postimage.org/image/g98psnlzl/
Thank you for your time,
Kabasauls