Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create combo box dynamically
Hi,
How to create comboboxes dynamically using in excel VBA. This i need to create whenever I am creating the row.. Thanks Durai |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create combo box dynamically
'-----------------------------------------------------------------
Sub CreateCombobox() '----------------------------------------------------------------- Dim oWs As Worksheet Dim oOLE As OLEObject Set oWs = ActiveSheet Set oOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo box.1", _ Left:=200, Top:=100, Width:=80, Height:=32) oOLE.ListFillRange = "A1:A10" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Hi, How to create comboboxes dynamically using in excel VBA. This i need to create whenever I am creating the row.. Thanks Durai |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create combo box dynamically
Thanks,
I am able to create combobox using this code.. Now I am able to move the combo to other place. But I need to create inside the cell where the user cannot able to move or delete. When I click the cell it should show the drop down button in left side by clicking that I should be able to show values as drop down list... Regards Durai "Bob Phillips" wrote in message ... '----------------------------------------------------------------- Sub CreateCombobox() '----------------------------------------------------------------- Dim oWs As Worksheet Dim oOLE As OLEObject Set oWs = ActiveSheet Set oOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo box.1", _ Left:=200, Top:=100, Width:=80, Height:=32) oOLE.ListFillRange = "A1:A10" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Hi, How to create comboboxes dynamically using in excel VBA. This i need to create whenever I am creating the row.. Thanks Durai |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create combo box dynamically
Is this more that you want
Sub AddDVDropDown() With Actfivecell.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=A1:A10" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Thanks, I am able to create combobox using this code.. Now I am able to move the combo to other place. But I need to create inside the cell where the user cannot able to move or delete. When I click the cell it should show the drop down button in left side by clicking that I should be able to show values as drop down list... Regards Durai "Bob Phillips" wrote in message ... '----------------------------------------------------------------- Sub CreateCombobox() '----------------------------------------------------------------- Dim oWs As Worksheet Dim oOLE As OLEObject Set oWs = ActiveSheet Set oOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo box.1", _ Left:=200, Top:=100, Width:=80, Height:=32) oOLE.ListFillRange = "A1:A10" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Hi, How to create comboboxes dynamically using in excel VBA. This i need to create whenever I am creating the row.. Thanks Durai |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create combo box dynamically
Actfivecell should probably be ActiveCell
-- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... Is this more that you want Sub AddDVDropDown() With Actfivecell.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=A1:A10" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Thanks, I am able to create combobox using this code.. Now I am able to move the combo to other place. But I need to create inside the cell where the user cannot able to move or delete. When I click the cell it should show the drop down button in left side by clicking that I should be able to show values as drop down list... Regards Durai "Bob Phillips" wrote in message ... '----------------------------------------------------------------- Sub CreateCombobox() '----------------------------------------------------------------- Dim oWs As Worksheet Dim oOLE As OLEObject Set oWs = ActiveSheet Set oOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo box.1", _ Left:=200, Top:=100, Width:=80, Height:=32) oOLE.ListFillRange = "A1:A10" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Hi, How to create comboboxes dynamically using in excel VBA. This i need to create whenever I am creating the row.. Thanks Durai |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create combo box dynamically
Unless I want five of them<g
Teach me to change Selection without trying it! Bob "Tom Ogilvy" wrote in message ... Actfivecell should probably be ActiveCell -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... Is this more that you want Sub AddDVDropDown() With Actfivecell.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=A1:A10" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Thanks, I am able to create combobox using this code.. Now I am able to move the combo to other place. But I need to create inside the cell where the user cannot able to move or delete. When I click the cell it should show the drop down button in left side by clicking that I should be able to show values as drop down list... Regards Durai "Bob Phillips" wrote in message ... '----------------------------------------------------------------- Sub CreateCombobox() '----------------------------------------------------------------- Dim oWs As Worksheet Dim oOLE As OLEObject Set oWs = ActiveSheet Set oOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo box.1", _ Left:=200, Top:=100, Width:=80, Height:=32) oOLE.ListFillRange = "A1:A10" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Hi, How to create comboboxes dynamically using in excel VBA. This i need to create whenever I am creating the row.. Thanks Durai |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create combo box dynamically
Thanks Mr.Bob Phillips
This is the one I want.. Regards Duraiswamy "Bob Phillips" wrote in message ... Is this more that you want Sub AddDVDropDown() With Actfivecell.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=A1:A10" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Thanks, I am able to create combobox using this code.. Now I am able to move the combo to other place. But I need to create inside the cell where the user cannot able to move or delete. When I click the cell it should show the drop down button in left side by clicking that I should be able to show values as drop down list... Regards Durai "Bob Phillips" wrote in message ... '----------------------------------------------------------------- Sub CreateCombobox() '----------------------------------------------------------------- Dim oWs As Worksheet Dim oOLE As OLEObject Set oWs = ActiveSheet Set oOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo box.1", _ Left:=200, Top:=100, Width:=80, Height:=32) oOLE.ListFillRange = "A1:A10" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Hi, How to create comboboxes dynamically using in excel VBA. This i need to create whenever I am creating the row.. Thanks Durai |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create combo box dynamically
Hi,
I am able to create the dropdown now.. I have created this by giving input of comma seperated string values.. I have one more requirement. Whenever the user click on one cell that cell(sya C1) that value should be selected in the dropdown(dropdown in A1). The dropdown value also containing the value of C1.. Is this possible? Regards Durai "Bob Phillips" wrote in message ... Is this more that you want Sub AddDVDropDown() With Actfivecell.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=A1:A10" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Thanks, I am able to create combobox using this code.. Now I am able to move the combo to other place. But I need to create inside the cell where the user cannot able to move or delete. When I click the cell it should show the drop down button in left side by clicking that I should be able to show values as drop down list... Regards Durai "Bob Phillips" wrote in message ... '----------------------------------------------------------------- Sub CreateCombobox() '----------------------------------------------------------------- Dim oWs As Worksheet Dim oOLE As OLEObject Set oWs = ActiveSheet Set oOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo box.1", _ Left:=200, Top:=100, Width:=80, Height:=32) oOLE.ListFillRange = "A1:A10" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Hi, How to create comboboxes dynamically using in excel VBA. This i need to create whenever I am creating the row.. Thanks Durai |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create combo box dynamically - one more doubt
Hi,
I am able to create the dropdown now.. I have created this by giving input of comma seperated string values.. I have one more requirement. Whenever the user click on one cell that cell(sya C1) that value should be selected in the dropdown(dropdown in A1). The dropdown value also containing the value of C1.. Is this possible? Regards Durai |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create combo box dynamically
The dropdown will reflect the value of the Cell (A1) where it is contained.
So you would set the value of A1 to equal the value of the cell clicked by the user. -- Regards, Tom Ogilvy "Duraiswamy Lingappan" wrote in message ... Hi, I am able to create the dropdown now.. I have created this by giving input of comma seperated string values.. I have one more requirement. Whenever the user click on one cell that cell(sya C1) that value should be selected in the dropdown(dropdown in A1). The dropdown value also containing the value of C1.. Is this possible? Regards Durai "Bob Phillips" wrote in message ... Is this more that you want Sub AddDVDropDown() With Actfivecell.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=A1:A10" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Thanks, I am able to create combobox using this code.. Now I am able to move the combo to other place. But I need to create inside the cell where the user cannot able to move or delete. When I click the cell it should show the drop down button in left side by clicking that I should be able to show values as drop down list... Regards Durai "Bob Phillips" wrote in message ... '----------------------------------------------------------------- Sub CreateCombobox() '----------------------------------------------------------------- Dim oWs As Worksheet Dim oOLE As OLEObject Set oWs = ActiveSheet Set oOLE = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo box.1", _ Left:=200, Top:=100, Width:=80, Height:=32) oOLE.ListFillRange = "A1:A10" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Duraiswamy Lingappan" wrote in message ... Hi, How to create comboboxes dynamically using in excel VBA. This i need to create whenever I am creating the row.. Thanks Durai |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dynamically create range of rows | Excel Discussion (Misc queries) | |||
Can we create pivot table dynamically | Excel Programming | |||
how to add a combo box in to a excel cell using VBA dynamically? | Excel Programming | |||
Create controls dynamically | Excel Programming | |||
Dynamically create Total using VBA formula | Excel Programming |