Change all to proper case using VBA - Office 365

Ichokuchi

New Member
Joined
Jul 6, 2018
Messages
37
Ok so I am trying to automatically have my form in excel change things to proper case when entered. I found a code that works but then seems to crash excel or kick me to debug here is what I have please help in fixing it so it works.

Private Sub Worksheet_Change(ByVal Target As Range)
'Update 20140603
Target.Value = Application.WorksheetFunction.Proper(Target.Value)
End Sub


- The line that when i go to debug that seems to be the issue is this one: Target.Value = Application.WorksheetFunction.Proper(Target.Value)


Please help! Thanks!
 
Are you simply entering values in cells?
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
what is a user created form?

A form someone created using excel, that is attached to another form to gather data from that form. cells are merged together for this or that. all this is besides the point though, as I stated the original code works with the exception of that box popping up to debug or end if contents are cleared to put something different in.
 
Upvote 0
If I an trying to help you my questions are not besides the point - I do not ask them for fun

Next test:
add a new sheet and put the VBA behind that sheet - use VBA from post#6
see what happens when you add or amend text etc
Does the bug still occur?
 
Upvote 0
If I an trying to help you my questions are not besides the point - I do not ask them for fun

Next test:
add a new sheet and put the VBA behind that sheet - use VBA from post#6
see what happens when you add or amend text etc
Does the bug still occur?

Sorry wasnt trying to discredit or upset or anything.
So when I do it to a new sheet, it works 100% I can clear things add things, but I need it to work with the old one as there is a lot going on in that which would take way to much time to recreate lol.
Its amazing to see it work though on that new sheet:)
 
Upvote 0
Ok - so something on your original sheet is doing something tha affect the way the macro is working
As you can now see - my question was not besides the point :)

If you work out what is different between the cell in the original sheet and the cell in the new sheet and tell me, then we can solve the problem
 
Upvote 0
Sorry wasnt trying to discredit or upset or anything.
So when I do it to a new sheet, it works 100% I can clear things add things, but I need it to work with the old one as there is a lot going on in that which would take way to much time to recreate lol.
Its amazing to see it work though on that new sheet:)

So I took a screenshot of what happens on original form with the code from post #6 when trying to clear contents of something
tinypic.com
[/URL][/IMG]
 
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,315
Members
449,081
Latest member
tanurai

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