Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help With Simple Combobox Programming

I have a combo box on sheet1. When the user clicks on the combo box the
first time ( it gets focus ) It should add/load all items from sheet2 column
A. Now when the user selects from the combobox that item should be
copied/placed on sheet1.A5 similarly the next item selected in the combo box
should be placed below A6 and so on

How can this be accomplished with code

thx



  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Help With Simple Combobox Programming

Hi,



Use code like that :





Private Sub cboIn_Click()

Dim intR As Integer

intR = Range("a4").CurrentRegion.Rows.Count

Range("a4").Offset(intR, 0).Value = cboIn.Value

End Sub



Private Sub cboIn_GotFocus()

Dim rg As Range

cboIn.Clear

For Each rg In Worksheets("sheet4").Range("a1").CurrentRegion

cboIn.AddItem rg.Text

Next rg

End Sub




--
JP

http://www.solutionsvba.com


"MAB" wrote in message
...
I have a combo box on sheet1. When the user clicks on the combo box the
first time ( it gets focus ) It should add/load all items from sheet2

column
A. Now when the user selects from the combobox that item should be
copied/placed on sheet1.A5 similarly the next item selected in the combo

box
should be placed below A6 and so on

How can this be accomplished with code

thx





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
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
Programming a simple formula anagaraj1 New Users to Excel 1 August 4th 05 03:32 PM
Make it more simple or intuitive to do simple things Vernie Charts and Charting in Excel 1 March 16th 05 04:01 AM


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

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

About Us

"It's about Microsoft Excel"