I am trying to get all entries in Column D of a single worksheet to capitalize. I am trying this code in the "ThisWorkbook" area of the spreadsheet.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Column = 4 Then Target = UCase(Target)
End Sub
Yet, when I try to save the file with these changes it says they cannot be saved in a Macro Free workbook. The problem is I have Macros enabled in this workbook under the Developer tab and also have the Access to VBA option checked as well.
Can someone tell me what I am doing wrong or if there is a better way of accomplishing this.
BTW, I am using Excel 2007.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Column = 4 Then Target = UCase(Target)
End Sub
Yet, when I try to save the file with these changes it says they cannot be saved in a Macro Free workbook. The problem is I have Macros enabled in this workbook under the Developer tab and also have the Access to VBA option checked as well.
Can someone tell me what I am doing wrong or if there is a better way of accomplishing this.
BTW, I am using Excel 2007.