Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Combo box in a worksheet

Howdy folks, sure appreciate you being there to help.

I was wondering if I could get some help with combo box stuff. I have
studied the contextures page and set up a box on a sheet but it did not work
as described.

I have a series of workbooks set up by year with each sheet representing an
auto in a managed fleet. I have code in "ThisWorkbook" to hide unused
columns, I have code in each sheet to make a dynamic list:see below. I have
code for auto inserting the date in cells of one column and a statice list of
initials in another.

I would really like for the dynamic list to autocomplete entries, and to
have the drop down formatted to look exactly as the list when opened. I set
up a combo box on the sheet and set the parameters as shown in contextures,
but it did not work in any way. Can anyone help me with this combo box issue?

this code is on each sheet:

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Dim ws As Worksheet
Dim i As Integer

Set ws = Worksheets("Lists")
If Target.Column = 1 And Target.Row 1 Then
If Application.WorksheetFunction.CountIf(ws.Range("Na meList"),
Target.Value) Then
Exit Sub
Else
i = ws.Cells(Rows.Count, 1).End(xlUp).Row + 1
ws.Range("A" & i).Value = Target.Value

End If
End If

End Sub

Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Automatically inserts today's date in cell in column C when selected
'if the cell was empty. Does not overwrite occupied cell.
If ActiveCell.Column = 3 Then 'Limits macro action to column C
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
Selection.Value = Date 'Insert today's date in Target cell
End If
Else
End If
End Sub
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
Worksheet 1 exact copy of worksheet 2, but in different order Lou@CRA Excel Discussion (Misc queries) 1 July 11th 06 05:49 PM
Best way to populate worksheet from 2 combo boxes jswasson Excel Worksheet Functions 0 July 7th 06 01:21 PM
Macro that can run combo boxes simonsmith Excel Discussion (Misc queries) 0 June 5th 06 05:00 PM
Retrieve data from all of the worksheet within the file dannyboy213 Excel Worksheet Functions 1 March 22nd 06 07:51 PM
Nesting Combo Boxes /Returning an Array ELMONDO SNITHER Excel Discussion (Misc queries) 1 June 30th 05 01:15 AM


All times are GMT +1. The time now is 11:34 AM.

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"