Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically create range of rows Avi Dubnikov Excel Discussion (Misc queries) 2 August 25th 07 02:00 AM
Can we create pivot table dynamically priya Excel Programming 2 June 22nd 04 01:26 PM
how to add a combo box in to a excel cell using VBA dynamically? Gamini Jayarathne Excel Programming 1 May 7th 04 11:57 AM
Create controls dynamically Tom Ogilvy Excel Programming 0 November 24th 03 03:37 PM
Dynamically create Total using VBA formula Kondayampalli Excel Programming 0 August 28th 03 03:06 PM


All times are GMT +1. The time now is 07:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"