REAL-TIME

VBA Projects

Full Access with Source Code
  • Designed and Developed by PNRao

  • Full Access with VBA Source Code

  • Well Commented Codes Lines

  • Creative and Professional Design

Effortlessly
Manage Your Projects

120+ Project Management Templates

Seamlessly manage your projects with our powerful & multi-purpose templates for project management.

120+ PM Templates Includes:
  • 50+ Excel Templates

  • 50+ PowerPoint Templates

  • 25+ Word Templates

Share Post

TextBox is used to display data, edit data, etc in the rectangular box. The Textbox can be linked to a Worksheet Cell. The TextBox can have static and dynamic value. When data or text is static in the TextBox field, it represents the read only information. It can be used on the WorkSheet or UserForm. You can see how it works and more details about ActiveX TextBox Control on the UserForm or Worksheet in the following chapter.

Text Box Excel ActiveX Control Object

VBA ActiveX TextBox_Control on the Worksheet

Please find more details about VBA ActiveX TextBox Control on the Worksheet.

    1. Go To Developer Tab and then click Insert from the Controls
    2. Click on the TextBox_control from the ActiveX Controls group.
    3. Drag the control on the Worksheet.
    4. Right click on the TextBox_control, before that Design Mode should be turned ON.
    5. Click on properties from the available list.
    6. On the left side find ‘Text’ from the available properties of the control.
    7. On the right side mention as ‘Welcome To Analysistabs.com’. Please find the below screen shot for the same.

TextBox Excel VBA ActiveX Control3

    1. You can link the Text box to a Worksheet cell. Right click on Text box and select properties.
    2. On the left side find ‘LinkedCell’ from the available properties of a Text Box.
    3. On the right side mention the linked cell as ‘F2’. Please find the below screen shot for the same.

TextBox Excel VBA ActiveX Control4

  1. Like this you can add number of TextBox controls on the Worksheet according to your requirement.

Delete TextBox_Control on the Worksheet using VBA

Please find the below code, it will show you how to delete or remove the control on the worksheet. In the below example, its deleting the Text Box named ‘TextBox1’ which is on the worksheet named ‘Sheet11’. Where Delete is the property of Shape object.

Sub Delete_TextBox()
    Sheets("Sheet11").Shapes("TextBox1").Delete
End Sub
Effortlessly Manage Your Projects and Resources
120+ Professional Project Management Templates!

A Powerful & Multi-purpose Templates for project management. Now seamlessly manage your projects, tasks, meetings, presentations, teams, customers, stakeholders and time. This page describes all the amazing new features and options that come with our premium templates.

Save Up to 85% LIMITED TIME OFFER
Project Management Templates

All-in-One Pack
120+ Project Management Templates

Essential Pack
50+ PM Templates

Excel Pack
50+ Excel PM Templates

PowerPoint Pack
50+ Excel PM Templates

MS Word Pack
25+ Word PM Templates

Ultimate Project
Management Template
Ultimate Resource
Management Template
Project Portfolio
Management Templates
Last Updated: March 2, 2023

2 Comments

  1. Susan June 17, 2023 at 7:04 PM

    How do I set ActiveX text box width and have it save and then allow text to fill and wrap to new lines within the desired ActiveX text box width (Example, at “480”)? Visually it looks great in Developer Design Mode, as well as in MS Word mode. Save as a .dotx, open template and save as unique word docx, go to type in ActiveX text box and it snaps back to a 6.35 width and the type fills into an increased depth. What am I missing?

    • PNRao June 19, 2023 at 12:43 PM

      You can set the TextBox width using .Width Property. Example

      TextBox1.Width=480
      

      Save the file as .dotm to save with Macros.

      Thanks

Leave A Comment