close

Hi,

Does anyone know how to ensure that a cell's text formatting properties
carry through to the selected value in a combo box?

For example, if the combo box is linked to a cell with the value 400,
with text suffix of quot;mmquot;, how do I get the combo box to display
quot;400mmquot; when selected?

Thanks for any help,

Simon

Excel 2000--
Simon205
------------------------------------------------------------------------
Simon205's Profile: www.excelforum.com/member.php...oamp;userid=34662
View this thread: www.excelforum.com/showthread...hreadid=544272You could load the combobox with code.

I used a combobox from the control toolbox on worksheet 1:

Option Explicit
Sub testme()

Dim myRng As Range
Dim myCell As Range

With Worksheets(quot;sheet1quot;)
Set myRng = .Range(quot;a1:A10quot;)
.ComboBox1.Clear
For Each myCell In myRng.Cells
.ComboBox1.AddItem myCell.Text
Next myCell
End With

End Sub

Simon205 wrote:
gt;
gt; Hi,
gt;
gt; Does anyone know how to ensure that a cell's text formatting properties
gt; carry through to the selected value in a combo box?
gt;
gt; For example, if the combo box is linked to a cell with the value 400,
gt; with text suffix of quot;mmquot;, how do I get the combo box to display
gt; quot;400mmquot; when selected?
gt;
gt; Thanks for any help,
gt;
gt; Simon
gt;
gt; Excel 2000
gt;
gt; --
gt; Simon205
gt; ------------------------------------------------------------------------
gt; Simon205's Profile: www.excelforum.com/member.php...oamp;userid=34662
gt; View this thread: www.excelforum.com/showthread...hreadid=544272

--

Dave Peterson


Ok, well I've never got into VB code before, so that's way over my
head!

I was hoping there'd be a properties option I'm not aware of, but
thanks for your help anyway?

Cheers,Simon--
Simon205
------------------------------------------------------------------------
Simon205's Profile: www.excelforum.com/member.php...oamp;userid=34662
View this thread: www.excelforum.com/showthread...hreadid=544272

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()