LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default UserForm Filter Combo Box List


I have created a UserForm to retrieve information from another workbook for
the user to view based on the Order Number they choose from a ComboBox list.

The following code works great for listing ALL the order numbers in the
ComboBox. However I would like to limit the list to show just the not
Completed orders and completed in the past 3 days. There is a column in the
Database where a completed date is entered, and I have Defined the name as
€śOrderCompleted€ť.

Can someone help me put the correct coding in that would be for
If the OrderCompleted cell is Null (or blank) or 3 days ago then show the
OrderNumber in the ComboBox list.


Private Sub UserForm_Initialize()

Dim bk As Workbook

' test to see if Destination.xls is already open

On Error Resume Next
Set bk = Workbooks("Database.xls")
Windows("Database.xls").Visible = False
On Error GoTo 0
If bk Is Nothing Then
bSave = True
Set bk = Workbooks.Open("C:\My Documents\Database.xls")
Windows("Database.xls").Visible = False
End If



Dim myArr As Variant

'create the list
myArr =
Workbooks("Database.xls").Worksheets("Databaseshee t").Range("OrderNumber").Value

'assign the array directly to the list.
Me.cmbOrderNumber.List = myArr
End Sub



I thank you for all your help. I have learned a great deal from reading
these posts.

--
Nancy
 
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 to apply filter based on list or combo box?? Jon Excel Discussion (Misc queries) 1 May 13th 09 01:01 PM
filter list combo box move Atishoo Excel Programming 4 June 4th 08 03:56 PM
Help please - List/Filter/Combo Box? Getting Fired Excel Discussion (Misc queries) 0 January 23rd 08 12:32 AM
Userform Combo box list PhilM Excel Programming 0 June 14th 06 10:29 AM
How do I bind a list in Excel to a combo box on a userform MikeM Excel Programming 3 June 14th 05 01:53 PM


All times are GMT +1. The time now is 05:08 PM.

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"