ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ComboBox fill ActiveCell (https://www.excelbanter.com/excel-programming/362340-combobox-fill-activecell.html)

AMY Z.

ComboBox fill ActiveCell
 
Hi,
Is it possible to select from a drop down box list and it will enter the
selection in the active cell?
Would this command be entered in the Linked Cell property of the drop down
box, or written in a procedure?
I couldn't find anything in the archives of the forums for something like
this, but maybe I worded it wrong.
Thank you for your time.
Amy

Ikaabod[_89_]

ComboBox fill ActiveCell
 

In the worksheet code that the combobox exists in:

Option Explicit
Dim myCell As String

Private Sub ComboBox1_Change()
Range(myCell).Value = ComboBox1.Value
Range(myCell).Select
End Sub

Private Sub ComboBox1_GotFocus()
myCell = ActiveCell.Address
End Sub


--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371
View this thread: http://www.excelforum.com/showthread...hreadid=545237


Tom Ogilvy

ComboBox fill ActiveCell
 
in the Procedure

for a combobox from the control toolbar toolbox

Private Sub Combobox1_click()
if Combobox1.ListIndex < -1 then
ActiveCell.Value = Combobox1.value
end if
End sub

--
Regards,
Tom Ogilvy

"AMY Z." wrote:

Hi,
Is it possible to select from a drop down box list and it will enter the
selection in the active cell?
Would this command be entered in the Linked Cell property of the drop down
box, or written in a procedure?
I couldn't find anything in the archives of the forums for something like
this, but maybe I worded it wrong.
Thank you for your time.
Amy


AMY Z.

ComboBox fill ActiveCell
 
Thank you for helping me. It works.
Amy

"AMY Z." wrote:

Hi,
Is it possible to select from a drop down box list and it will enter the
selection in the active cell?
Would this command be entered in the Linked Cell property of the drop down
box, or written in a procedure?
I couldn't find anything in the archives of the forums for something like
this, but maybe I worded it wrong.
Thank you for your time.
Amy



All times are GMT +1. The time now is 07:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com