Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default No replies, so again : How to add Combobox to cell dynamically?

Hi,


1. I need to check the 1st column (A) of each row, and if it is not
empty, add a combobox to column B of that row.

Trivial .. I hope i will be able to do it, but seggestions welcome :
2. I need to be populate the combobox with data from some other sheets
in the same workbook
3. I need to be able to go to a specific web page if any combobox
entry is clicked. For eg : if entry 1234 is clicked, i should go to
http://www.example.com/1234

Any pointers , especially to (1) above, are appreciated.

Any good startup resources on the net (free, please) are also welcome


Thanks
Abhinav

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default No replies, so again : How to add Combobox to cell dynamically?

I've had little luck creating design-time objects at run time. It's extremely
messy, when it's possible at all.

You might try creating a combo box for each row at design time, but set its
Visible property to False. Then at run time, you can set the Visible property
to True for each combo box as appropriate, and populate its contents. Still
very messy.

Hope this helps,
Wes
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default No replies, so again : How to add Combobox to cell dynamically?

Hi Abhinav,

Try running the InsertCombos macro I've made for you. As it creates
the comboboxes, it uses the contents of cells A1:A5 (on Sheet2) to
define the list for the comboboxes. If you needed a different list
for each Combobox, post back with more details. Make sure the
ShowWebPage macro is in a standard module, it will be run whenever
you make a selection from one of the ComboBoxes.

Regards,
Vic Eldridge


Sub InsertCombos()
Dim cel As Range
For Each cel In Range("A1", Range("A65536").End(xlUp))
If cel.Value < "" Then
With ActiveSheet.DropDowns.Add( _
Left:=cel.Offset(0, 1).Left, _
Top:=cel.Top, _
Height:=cel.Height, _
Width:=80)
.ListFillRange = "Sheet2!$A$1:$A$5"
.OnAction = "ShowWebPage"
End With
End If
Next cel
End Sub

Sub ShowWebPage()
With ActiveSheet.DropDowns(Application.Caller)
ActiveWorkbook.FollowHyperlink Address:= _
"http://www.example.com/" & .List(.ListIndex)
End With
End Sub




Abhinav wrote in message ...
Hi,


1. I need to check the 1st column (A) of each row, and if it is not
empty, add a combobox to column B of that row.

Trivial .. I hope i will be able to do it, but seggestions welcome :
2. I need to be populate the combobox with data from some other sheets
in the same workbook
3. I need to be able to go to a specific web page if any combobox
entry is clicked. For eg : if entry 1234 is clicked, i should go to
http://www.example.com/1234

Any pointers , especially to (1) above, are appreciated.

Any good startup resources on the net (free, please) are also welcome


Thanks
Abhinav

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
creating a combobox dynamically on an excel sheet gupt New Users to Excel 8 June 7th 05 04:07 AM
How to add a Combobox dynamically based on contents of some other cell? Abhinav[_2_] Excel Programming 1 May 13th 04 11:00 AM
Dynamically adding data to a Combobox? samanathon Excel Programming 4 April 5th 04 11:26 AM
Dynamically adding an in-cell drop-down list (i.e. Validation Object) to a cell? debartsa Excel Programming 5 March 5th 04 08:45 AM
Program a combobox/dropdownlist to create textboxes dynamically ed Excel Programming 0 October 30th 03 09:02 PM


All times are GMT +1. The time now is 03:39 AM.

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"