{"id":8567,"date":"2021-12-14T13:59:26","date_gmt":"2021-12-14T13:59:26","guid":{"rendered":"https:\/\/officetuts.net\/excel\/?p=8567"},"modified":"2024-03-30T00:27:23","modified_gmt":"2024-03-30T00:27:23","slug":"format-textbox-phone-number-in-vba","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/vba\/format-textbox-phone-number-in-vba\/","title":{"rendered":"How to Format Textbox Phone Number in VBA"},"content":{"rendered":"\n
So far, we mainly discussed Modules when we talked about the VBA. But, if you have ever dealt with Visual Basic<\/strong> in Excel, there is a high chance that you stumbled upon User Forms<\/strong> as well.<\/p>\n\n\n\n In the example below, we will show how to create User Forms<\/strong>, how to assign code to them, and how to use built-in codes in User Forms<\/strong> to your advantage. We will use this knowledge to format Text Box<\/strong> in User Form<\/strong> to show the phone number in a way we want.<\/p>\n\n\n\n The first thing that we need to do is to create a User Form<\/strong>. To do so, we need to open the Visual Basic<\/strong>, either by going to the Developer tab >> Code >> Macros<\/strong> or simply by clicking ALT + F11<\/strong>.<\/p>\n\n\n\n Once we are on this window, we will right-click anywhere on the left window (beneath the Project) and go to Insert >> UserForm<\/strong>:<\/p>\n\n\n\nCreating User Forms in VBA<\/h2>\n\n\n\n