Link to home
Start Free TrialLog in
Avatar of Svgmassive
Svgmassive

asked on

Make Code UPPER case

Is there an addin besides MZTools to makes some  vba code upper case
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Hum...not aware of any.   It would be unusual in that normally one uses camel case when coding (upper and lower) for readability and in some languages, code is case sensitive.   So to have a tool that would change that would be unusual.

 Not saying ones not out there, just that I'm not aware of any.  

 Curious as to why you want to do this.

Jim.
It sounds like you may not know about the UCASE() or LCASE() functions in VBA.  Even if you do, this will not be enough as it sounds like you are wanting to have this conversion be done automatically.

If you don't want to create your own conversion function that is triggered by a built-in Access or Excel event, then I hope someone has another add-in that does this.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Daniel Pineault
Daniel Pineault

VBA RubberDuck does lots of stuff, not sure if this is a function that it does or not, but may be worth checking.

I hope you realize that most VBA you can't control the Case.  Even if you set a function like DLOOKUP, the VBE will always change it back to DLookUp...  The only thing you can truly control are your Variable names, but as others have stated CamelCase is best for that.
o.k.  now I'm with Jim.  I didn't catch the idea of changing VBA code that is displayed in the VBA editor.

Since the VBA editor changes a lot of VBA code to its proper case, regardless of what the user types... why would you want to do this?  Are we trying to change the case of string values in the code, etc.?
A simple work around could be to use MS Word. Copy the code from the VB Editor into a Word document and then use the Change Case options on the Home tab, Font Group.

Then copy from Word back into the VB Editor.
Well if its printing probably also a good idea would be to copy paste the code to Notepad++...select as Language Visual Basic and then "play" with the various formatting options/Styles to change it to your liking...but as other said i am not sure if Capitalizing would save the day...