PC Review


Reply
Thread Tools Rate Thread

ActiveX Combobox and LinkedCell

 
 
aqualibra
Guest
Posts: n/a
 
      21st Aug 2008
Hi -

I am created my combobox using activeX control. In the linked cell
properties, I specified the cell.
When I select an option in the combobox I want the linked cell to show the
option number rather than the option itself.
Cell Value
D56 4
D57 8
D58 7


For eg:
Linked cell : $D$53
I left the listfillrange blank but wrote a program in VBA to list the values
in my combobox
Sub Combobox1_enter()
Me.ComboBox1.Clear
Me.ComboBox1.AddItem (Sheets("Input").Range("D56"))
Me.ComboBox1.AddItem (Sheets("Input").Range("D57"))
Me.ComboBox1.AddItem (Sheets("Input").Range("D58"))
End Sub

If in my combobox I picked 8 (D57), I don't want the linked cell to show 8
but rather I want it to show 2 for second option picked in the list. How do I
do this.

Thanks
 
Reply With Quote
 
 
 
 
akphidelt
Guest
Posts: n/a
 
      21st Aug 2008
Haven't ever used the ActiveX combobox but you can do the exact same thing
using the Forms Combobox... and that linked cell will just give you the
number that you want.

"aqualibra" wrote:

> Hi -
>
> I am created my combobox using activeX control. In the linked cell
> properties, I specified the cell.
> When I select an option in the combobox I want the linked cell to show the
> option number rather than the option itself.
> Cell Value
> D56 4
> D57 8
> D58 7
>
>
> For eg:
> Linked cell : $D$53
> I left the listfillrange blank but wrote a program in VBA to list the values
> in my combobox
> Sub Combobox1_enter()
> Me.ComboBox1.Clear
> Me.ComboBox1.AddItem (Sheets("Input").Range("D56"))
> Me.ComboBox1.AddItem (Sheets("Input").Range("D57"))
> Me.ComboBox1.AddItem (Sheets("Input").Range("D58"))
> End Sub
>
> If in my combobox I picked 8 (D57), I don't want the linked cell to show 8
> but rather I want it to show 2 for second option picked in the list. How do I
> do this.
>
> Thanks

 
Reply With Quote
 
aqualibra
Guest
Posts: n/a
 
      21st Aug 2008
I know that form combobox does it, but I have certain conditions that I have
to use for the combobox and therefore need to use activeX

"akphidelt" wrote:

> Haven't ever used the ActiveX combobox but you can do the exact same thing
> using the Forms Combobox... and that linked cell will just give you the
> number that you want.
>
> "aqualibra" wrote:
>
> > Hi -
> >
> > I am created my combobox using activeX control. In the linked cell
> > properties, I specified the cell.
> > When I select an option in the combobox I want the linked cell to show the
> > option number rather than the option itself.
> > Cell Value
> > D56 4
> > D57 8
> > D58 7
> >
> >
> > For eg:
> > Linked cell : $D$53
> > I left the listfillrange blank but wrote a program in VBA to list the values
> > in my combobox
> > Sub Combobox1_enter()
> > Me.ComboBox1.Clear
> > Me.ComboBox1.AddItem (Sheets("Input").Range("D56"))
> > Me.ComboBox1.AddItem (Sheets("Input").Range("D57"))
> > Me.ComboBox1.AddItem (Sheets("Input").Range("D58"))
> > End Sub
> >
> > If in my combobox I picked 8 (D57), I don't want the linked cell to show 8
> > but rather I want it to show 2 for second option picked in the list. How do I
> > do this.
> >
> > Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
List box activeX control and linkedcell value Sirpent0r Microsoft Excel Discussion 2 31st Mar 2009 04:38 AM
ActiveX combobox aqualibra Microsoft Excel Worksheet Functions 1 24th Aug 2008 07:54 AM
How can I use VBA to set the value of an ActiveX ComboBox =?Utf-8?B?SGFycnkgRi4=?= Microsoft Excel Programming 6 13th Jul 2007 10:32 PM
publish activeX combobox and other activeX control =?Utf-8?B?aXJlbmUgYw==?= Microsoft Excel Programming 0 19th Mar 2007 07:19 AM
inserting rows duplicates combobox's linkedCell factrac Microsoft Excel Misc 1 16th Dec 2003 12:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:09 PM.