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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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