![]() |
ComboBox help.
Hi, I have a 25 combobox's on my spreadsheet, when an item from the list is selected it makes a call to a webservice, which returns to items of data. I want the returned data to be placed in the cells next to the combobox that was used, i.e. combobox in cell B1 I want the data to go in cell B2 and B3. This works if I use the following in a for loop: Cells(31, 3 + i) = ComponentResult(i) But my problem is that the comboBox could be 1 of 25 therefore how do I get the cell reference without hard coding 25 different possible cells? Tired using the linked cell, also tried setting the active cell to that of the combobox but with no joy! any ideas am I going about this in the correct way? -- cmpcwil2 ------------------------------------------------------------------------ cmpcwil2's Profile: http://www.excelforum.com/member.php...o&userid=33411 View this thread: http://www.excelforum.com/showthread...hreadid=532308 |
ComboBox help.
combobox from the control toolbox toolbar?
If you know which combobox executed the code, then you can use activesheet.oleObjects("Combobox1").topLeftCell.of fset(1,0)).Value = -- Regards, Tom Ogilvy "cmpcwil2" wrote: Hi, I have a 25 combobox's on my spreadsheet, when an item from the list is selected it makes a call to a webservice, which returns to items of data. I want the returned data to be placed in the cells next to the combobox that was used, i.e. combobox in cell B1 I want the data to go in cell B2 and B3. This works if I use the following in a for loop: Cells(31, 3 + i) = ComponentResult(i) But my problem is that the comboBox could be 1 of 25 therefore how do I get the cell reference without hard coding 25 different possible cells? Tired using the linked cell, also tried setting the active cell to that of the combobox but with no joy! any ideas am I going about this in the correct way? -- cmpcwil2 ------------------------------------------------------------------------ cmpcwil2's Profile: http://www.excelforum.com/member.php...o&userid=33411 View this thread: http://www.excelforum.com/showthread...hreadid=532308 |
ComboBox help.
I have tried with both the control toolbox and the visual basic one. Thanks for the tip I will give it a go. Cheer -- cmpcwil ----------------------------------------------------------------------- cmpcwil2's Profile: http://www.excelforum.com/member.php...fo&userid=3341 View this thread: http://www.excelforum.com/showthread.php?threadid=53230 |
ComboBox help.
Hi, activesheet.oleObjects("Combobox1").topLeftCell.of fset(1,0)).Value = This is exactly what I was after, I have spent days looking for this s thank you very muc -- cmpcwil ----------------------------------------------------------------------- cmpcwil2's Profile: http://www.excelforum.com/member.php...fo&userid=3341 View this thread: http://www.excelforum.com/showthread.php?threadid=53230 |
All times are GMT +1. The time now is 10:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com