The cell formatting does not apply to the existing value, it will change on subsequent value changes automatically. I have come up with this;
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
For Each cell As DataGridViewCell In DataGridView1.SelectedCells
cell.ValueType = GetType(System.Single)
Dim newStyle As New DataGridViewCellStyle
newStyle.Format = "C"
cell.Style.ApplyStyle(newStyle)
Next
End Sub
Private Sub DataGridView1_CellFormatting(sender As Object, e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
If Not IsNothing(e.Value) Then
If IsNumeric(e.Value) Then
e.Value = Format(CDbl(e.Value), e.CellStyle.Format)
End If
End If
End Sub