Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is CreateObject used to place a new label or text box onto a form at run
time? All I could find in the examples is how to create applications or workbooks: Set xlApp = CreateObject("Excel.Application") Thanks in advance, -Tim |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No, here is an example
Dim newButton As msforms.Control Select Case True Case chkText.Value Set newButton = Me.Controls.Add("Forms.Textbox.1") newButton.Name = "New Textbox" Case chkButton.Value Set newButton = Me.Controls.Add("Forms.CommandButton.1") newButton.Caption = "newCmd" Case chkCheckbox.Value Set newButton = Me.Controls.Add("Forms.Checkbox.1") newButton.Caption = "Another Checkbox" End Select With newButton .Left = 100 .Top = 50 .Visible = True End With -- HTH RP "Tim Coddington" wrote in message ... Is CreateObject used to place a new label or text box onto a form at run time? All I could find in the examples is how to create applications or workbooks: Set xlApp = CreateObject("Excel.Application") Thanks in advance, -Tim |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
AAAAAH. Thanks, Bob!
"Bob Phillips" wrote in message ... No, here is an example Dim newButton As msforms.Control Select Case True Case chkText.Value Set newButton = Me.Controls.Add("Forms.Textbox.1") newButton.Name = "New Textbox" Case chkButton.Value Set newButton = Me.Controls.Add("Forms.CommandButton.1") newButton.Caption = "newCmd" Case chkCheckbox.Value Set newButton = Me.Controls.Add("Forms.Checkbox.1") newButton.Caption = "Another Checkbox" End Select With newButton .Left = 100 .Top = 50 .Visible = True End With -- HTH RP "Tim Coddington" wrote in message ... Is CreateObject used to place a new label or text box onto a form at run time? All I could find in the examples is how to create applications or workbooks: Set xlApp = CreateObject("Excel.Application") Thanks in advance, -Tim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User Form Text Boxes - Copy format of text boxes | Excel Discussion (Misc queries) | |||
Excel 2007 text labels in category axis - missing labels | Charts and Charting in Excel | |||
Data labels switch to text boxes on negative values | Charts and Charting in Excel | |||
XL97: Position text boxes (or data labels) w/out VBA | Charts and Charting in Excel | |||
MSForm 1 - Initial placement of form | Excel Programming |