Problem Forcing ALL CAPS in Column - Security Free Message Continues to Come Up

kescco

Board Regular
Joined
Sep 14, 2009
Messages
174
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.

 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
When we save with codes you have to select the file type.
Click save then just below to file name are the options for File type "Save as Type:"
 
Upvote 0

Forum statistics

Threads
1,214,656
Messages
6,120,762
Members
448,991
Latest member
Hanakoro

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