Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, is there a way that i can add text boxs and labels to my userfor
using coding instead of just using the toolbox? Can this be done? thanks chris -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chris,
Yes, it can be done. The changes are temporary, though; the control will disappear when the form is unloaded. For example, the following will add a text box to Userform1. Dim TBX As MSForms.TextBox With UserForm1.Controls Set TBX = .Add(bstrprogid:="Forms.TextBox.1", _ Name:="MyTextBox", Visible:=True) TBX.Top = 50 TBX.Left = 100 End With UserForm1.Show -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "chrisdarl " wrote in message ... Hi, is there a way that i can add text boxs and labels to my userform using coding instead of just using the toolbox? Can this be done? thanks chris. --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Alternative approach is to add them at design time, but hide them until you
need them. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "chrisdarl " wrote in message ... Hi, is there a way that i can add text boxs and labels to my userform using coding instead of just using the toolbox? Can this be done? thanks chris. --- Message posted from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is another source of information:
http://j-walk.com/ss/excel/tips/tip76.htm Creating a UserForm Programmatically or the parent page: http://j-walk.com/ss/excel/tips/userformtips.htm at John Walkenbach's site -- Regards, Tom Ogilvy "chrisdarl " wrote in message ... Hi, is there a way that i can add text boxs and labels to my userform using coding instead of just using the toolbox? Can this be done? thanks chris. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MS Web Components | Excel Discussion (Misc queries) | |||
office web components | Excel Worksheet Functions | |||
Taking data from 3 different cells and adding the components toget | Excel Worksheet Functions | |||
Using Microsoft Web Components In VB | Excel Programming | |||
Adding components to multipage programatically | Excel Programming |