{"id":12099,"date":"2011-11-26T10:35:22","date_gmt":"2011-11-26T10:35:22","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=846"},"modified":"2011-11-26T10:35:22","modified_gmt":"2011-11-26T10:35:22","slug":"how-to-force-proper-case-in-textbox","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2011\/11\/how-to-force-proper-case-in-textbox\/","title":{"rendered":"How to force proper case in textbox"},"content":{"rendered":"
Proper Text is nothing but each word will have it’s first letter in caps. If you want to change every first letter of each word in a sentence then you can use StrConv<\/strong> function of VB in VBA.<\/p>\n Syntax:<\/strong><\/p>\n <\/p>\n String(Mandatory)<\/strong><\/em> String is the String which you want to make in Proper Case.<\/p>\n Conversion as StrConv(Mandatory):<\/strong><\/em> This is set of Conversion type which is available under this function. Below are the main types which are used frequently:- LocaleID:<\/strong><\/em> This an optional input. Read This Also:<\/strong><\/p>\n Proper Text is nothing but each word will have it’s first letter in caps. If you want to change every first letter of each word in a sentence then you can use StrConv function of VB in VBA. Syntax: String(Mandatory) String is the String which you want to make in Proper Case. Conversion as StrConv(Mandatory): […]<\/p>\n","protected":false},"author":45,"featured_media":849,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1246,1674],"tags":[],"class_list":["post-12099","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-macro","category-excel-macro-basics"],"yoast_head":"\n
\nvbLowerCase<\/em><\/span> This will convert string in lower case
\nvbUpperCase<\/em><\/span> This will convert string in Upper case
\nvbProperCase<\/em><\/span> This will convert string in Proper case<\/p>\n
\nHow to make every first letter of a word in Capital letter of a Textbox:<\/strong> Copy and Paste the below code in Textbox Change Event. This is the simplest way to force proper case in textbox<\/strong><\/p>\nPrivate Sub TextBox1_Change()\nTextBox1.Text = StrConv(TextBox1.Text, vbProperCase)\nEnd Sub<\/code><\/pre>\n
\n