Code causes crash

Newbienew

Active Member
Joined
Mar 17, 2017
Messages
395
Office Version
  1. 2016
Platform
  1. Windows
So i am having an issue with a code that I was using. It makes everything capitalize on the page no matter where. Bu when I use code now it freezes the workbook and then crashes it. Is there anything I can do about this? I have provided the code that i use below



Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim R As Range
For Each R In Target
If Not IsEmpty(R) And Not R.HasFormula Then R.Value = UCase(R.Value)
Next R
End Sub
 
So you are not installing the code the way I explained.
You keep wanting to put the code in a Module.

Well if it all works for you I guess that is great.

Normally a Macro like this is activated any time you change a value in a cell not when you press the Run Button.
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I was actually stating that I did follow your directions the second time around, and it worked out. The first time I used it I click the run button
 
Upvote 0
Glad I was able to help you.
Come back here to Mr. Excel next time you need additional assistance.
I was actually stating that I did follow your directions the second time around, and it worked out. The first time I used it I click the run button
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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