LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #15   Report Post  
Dave Peterson
 
Posts: n/a
Default

That was the second one:

If to the right one:
Private Sub ComboBox1_Change()
ActiveCell.Value = Me.ComboBox1.Value
ActiveCell.Offset(0, 1).Activate
End Sub

But I gotta believe that your columns are limited--say B:Z. When you enter data
in B3, go to C3, ..., but when you get to Z3, go to B4????

If that's ok, you could change that sub:

If to the right one:
Private Sub ComboBox1_Change()
ActiveCell.Value = Me.ComboBox1.Value
if activecell.column = range("z1").column then
cells(activcell.row+1,"B").activate
else
ActiveCell.Offset(0, 1).Activate
end if
End Sub

Change z1 to the correct column (the row won't matter).
And change "B" to the first column in the range.



Jan Buckley wrote:

The "next cell" will always be one to the right. Can you write the code for
that? You guys sure are patient with us beginners, and I really appreciate it.

"Dave Peterson" wrote:

If the next cell is down one:

Private Sub ComboBox1_Change()
ActiveCell.Value = Me.ComboBox1.Value
ActiveCell.Offset(1, 0).Activate
End Sub

If to the right one:
Private Sub ComboBox1_Change()
ActiveCell.Value = Me.ComboBox1.Value
ActiveCell.Offset(0, 1).Activate
End Sub

Maybe?????

Jan Buckley wrote:

Dave, this works great, can't tell you how much I've learned during this
little exercise. But is there any way that the user can TAB to the next cell
(after selecting the date from the combo box) rather than having to CLICK
into it? Thanks.

"Jan Buckley" wrote:

JE: That sounds like it would work much better but, not being a programmer, I
don't know how to accomplish it. Can you help?


"JE McGimpsey" wrote:

One way:

For 1 combobox, add this to your worksheet code module (adjust "A1" to
suit):

Private Sub Worksheet_SelectionChange( _
ByVal Target As Range)
ComboBox1.Visible = _
Not (Intersect(Target, Range("A1")) Is Nothing)
End Sub

However, if you've got 500 rows that require comboboxes, I'd consider
rethinking the approach. Perhaps using a single combobox and positioning
it at the appropriate cell whenever one of the cells is selected, then
placing the value of the combobox into the selected cell rather than
hardcoding it.

In article ,
"Jan Buckley" wrote:

I hate to bother you again, but is there a way to "hide" the combo box
until you click or tab into the cell where it resides? I have four columns
(containing up to 500 rows each) on my spreadsheet that will require the
combo boxes and it looks 'ugly' with them all showing. Thanks.


--

Dave Peterson


--

Dave Peterson


 
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
How do I make other cells dependent on my drop down list? mae1778 Excel Discussion (Misc queries) 1 July 29th 05 04:25 PM
Trying to Create a Conditional Drop down list Noel Excel Worksheet Functions 6 July 26th 05 05:18 PM
How do you create a drop down list? Aviator Excel Discussion (Misc queries) 2 December 28th 04 03:07 PM
edit a drop down list paulp Excel Discussion (Misc queries) 1 December 22nd 04 03:20 PM
Drop dow list complication Ryan Excel Discussion (Misc queries) 2 December 16th 04 07:49 PM


All times are GMT +1. The time now is 08:33 AM.

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"