Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forms ComboBox


Hi, I know how to find the cell address of a given vb combobox and the
set the offset....
ActiveSheet.OLEObjects("combobox 1").TopLeftCell.Offset(0, 1 + i)

But how do you do this for a form ComboBox?
I have tried declaring a combobox object but there is no TopLeftCell
do you have to use the linked cell property and then change th
activecell property?

Thank

--
cmpcwil
-----------------------------------------------------------------------
cmpcwil2's Profile: http://www.excelforum.com/member.php...fo&userid=3341
View this thread: http://www.excelforum.com/showthread.php?threadid=53446

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Forms ComboBox

This worked ok for me:

Dim myDD As DropDown
Set myDD = ActiveSheet.DropDowns("Drop Down 1")
MsgBox myDD.TopLeftCell.Address

cmpcwil2 wrote:

Hi, I know how to find the cell address of a given vb combobox and then
set the offset....
ActiveSheet.OLEObjects("combobox 1").TopLeftCell.Offset(0, 1 + i)

But how do you do this for a form ComboBox?
I have tried declaring a combobox object but there is no TopLeftCell,
do you have to use the linked cell property and then change the
activecell property?

Thanks

--
cmpcwil2
------------------------------------------------------------------------
cmpcwil2's Profile: http://www.excelforum.com/member.php...o&userid=33411
View this thread: http://www.excelforum.com/showthread...hreadid=534463


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forms ComboBox


Hi, thanks for the reply but it doesn't work for me.
I get the following error:
unable to get the DropDowns property of the worksheet class

Also when I try and replace DropDown with ComboBox I get the following
error:
object doesn't support this property or method.


--
cmpcwil2
------------------------------------------------------------------------
cmpcwil2's Profile: http://www.excelforum.com/member.php...o&userid=33411
View this thread: http://www.excelforum.com/showthread...hreadid=534463

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forms ComboBox


Hi,
The following works..
Dim myDD As DropDown
Set myDD = ActiveSheet.DropDowns(Application.Caller)
MsgBox myDD.TopLeftCell.Address

Thanks for the help


--
cmpcwil2
------------------------------------------------------------------------
cmpcwil2's Profile: http://www.excelforum.com/member.php...o&userid=33411
View this thread: http://www.excelforum.com/showthread...hreadid=534463

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Forms ComboBox

I would bet that the dropdown isn't named "drop down 1".

If you select it and look in the name box (to the left of the formula bar),
you'll see the name.



cmpcwil2 wrote:

Hi, thanks for the reply but it doesn't work for me.
I get the following error:
unable to get the DropDowns property of the worksheet class

Also when I try and replace DropDown with ComboBox I get the following
error:
object doesn't support this property or method.

--
cmpcwil2
------------------------------------------------------------------------
cmpcwil2's Profile: http://www.excelforum.com/member.php...o&userid=33411
View this thread: http://www.excelforum.com/showthread...hreadid=534463


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Forms ComboBox

This'll work depending on how the code is called.

cmpcwil2 wrote:

Hi,
The following works..
Dim myDD As DropDown
Set myDD = ActiveSheet.DropDowns(Application.Caller)
MsgBox myDD.TopLeftCell.Address

Thanks for the help

--
cmpcwil2
------------------------------------------------------------------------
cmpcwil2's Profile: http://www.excelforum.com/member.php...o&userid=33411
View this thread: http://www.excelforum.com/showthread...hreadid=534463


--

Dave Peterson
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
AutoComplete - Forms Combobox Sige Excel Worksheet Functions 2 November 30th 05 09:17 AM
Clear Combobox from forms toolbar Pete Excel Programming 1 September 25th 05 05:50 PM
combobox from forms toolbar MVM Excel Programming 4 August 2nd 05 09:52 PM
how do I change the font in an Excel XP forms combobox? Erik at VEIC Excel Programming 0 October 18th 04 10:01 PM
HELP : ComboBox (Forms), Activex or What ? MIKO Excel Programming 3 July 1st 04 11:03 PM


All times are GMT +1. The time now is 12:35 PM.

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

About Us

"It's about Microsoft Excel"