Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jan Buckley
 
Posts: n/a
Default

It's been some time since I worked on this project and I've kind of lost the
thread. Does this code have to be added to the code you previously sent (on
the 17th of Aug) or should it work by itself? I keyed it in and it doesn't
seem to work. Here's some additional info about what I'm trying to do: I have
a worksheet that serves as a purchase card log for purchases made with a
government credit card. Data must be entered in columns A thorugh M. Columns
F, H, K, and L currently contain drop down lists (Data/Validation/List)
containing dates derived from named ranges on another sheet. These are the
columns that I would like to contain the combo boxes. I would like the combo
boxes to appear only when clicked into, then allow the user to select a date
from a list that starts with today's date, (but you can move forward or
backward through the dates, or type in a date rather than select from the
list). I would like the user to be able to tab to the next column as well as
click into the next column. thanks for all your help so far.

jan buckley


"Dave Peterson" wrote:

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

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
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 12:24 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"