How to insert a checkmark with vba

Pookiemeister

Well-known Member
Joined
Jan 6, 2012
Messages
563
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I have a pass or fail option buttons. if the user selects "pass" option button a green check mark appears on the designated cell on the spreadsheet. The problem is I can't find a check mark in ascii only in Unicode. So I guess my question is how can I display a check mark and turn it green using colorindex?
Thanks
 
Here is my code. Hope you can figure it out and thanks again.

Private Sub CmdOK_Click()

'Determine emptyRow
emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1

'Export Data to worksheet
Cells(emptyRow, 1).Value = LblDateCodeInput
Cells(emptyRow, 2).Value = TxtBxMtLtNum.Value
Cells(emptyRow, 3).Value = CmbTieSize.Column(0)
Cells(emptyRow, 4).Value = LblTieColorDisplay
Cells(emptyRow, 5).Value = TxtWeight.Value
Cells(emptyRow, 6).Value = TxtLength.Value
If OptionButton1 = True Then
Cells(emptyRow, 7).Value = ChrW(&H2713)
' Cells(2, 7).Font.Color = vbGreen
Else
Cells(emptyRow, 7).Value = "X"
End If

Cells(emptyRow, 8).Value = TxtTrvl.Value & Chr(34)
If OptionButton5 = True Then
Cells(emptyRow, 9).Value = ChrW(&H2713)
' Cells(2, 7).Font.Color = vbGreen
Else
Cells(emptyRow, 9).Value = "X"
End If
If OptionButton5 = True Then
Cells(emptyRow, 10).Value = ChrW(&H2713)
' Cells(2, 7).Font.Color = vbGreen
Else
Cells(emptyRow, 10).Value = "X"
End If
Cells(emptyRow, 11).Value = TextBox4.Value

End Sub
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,215,429
Messages
6,124,835
Members
449,192
Latest member
mcgeeaudrey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top