Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default Best way to manage product database


"Spencer" wrote in message
...
I could use a little help with this project. i have my design complete.
it
is an order management system. way too simple for the need to use access,
plus i want to distribute it on a common software like excel.
I have a list of products. Each product belongs to a category. I want
the
user to be able to pick a category from a combobox on a userform and have
the
forms list box be populated with the productsin that category.
i have played with using filtering and cannot perfect it. i tried using a
named range (for the product list) but cannot figure out how to not
include
the column headings in the listbox. is there a better technique?


HI Spencer

You appear to have succesfully populated your combobox with categories.

Presumabley you achieved this by adding code to the UserForm_Initialize()
event

Now I think you need to stick some code in ComboBox1_Change() event with
the goal of populating the list box
with products correspopnding to your selection.

I dont know your Data but in general terms the combox change event would do
the following actions once the user form had been called


1) Clear the list box for example ListBox1.clear

2) Set a variable = to the Comboxbox selection

3) Programatically locate the product range and array all members which
index against the variable set in 2) above

You can use many tricks to do this range or cell offset comparisons using
if statments to parse out products not corresponding to the catgory criteria

4) Using additem populate the list box. from the array created in 3)


Something like this where the data sheet has column eE polulated with with
categories andcolumn E is populatyed with corresponding products


Private Sub ComboBox1_Change()

ListBox1.Clear

Dim aaa As String
aaa = ComboBox1.Value


Range("D1").Select
Range(Selection, Selection.End(xlDown)).Select

Dim task As Range
Dim prod As String
Set task = Selection

For Each cell In task
prod = ""
If cell.Value = aaa Then prod = cell.Offset(0, 1).Value
If prod < "" Then ListBox1.AddItem prod
Next

End Sub


I wish I could be more specific, so I hope this attempt atl east gets you
going in the right direction.




Best

N10



You now need some code in your


  #2   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default Best way to manage product database


"N10" wrote in message
...

"Spencer" wrote in message
...
I could use a little help with this project. i have my design complete.
it
is an order management system. way too simple for the need to use
access,
plus i want to distribute it on a common software like excel.
I have a list of products. Each product belongs to a category. I want
the
user to be able to pick a category from a combobox on a userform and have
the
forms list box be populated with the productsin that category.
i have played with using filtering and cannot perfect it. i tried using
a
named range (for the product list) but cannot figure out how to not
include
the column headings in the listbox. is there a better technique?


HI Spencer

You appear to have succesfully populated your combobox with categories.

Presumabley you achieved this by adding code to the
UserForm_Initialize() event

Now I think you need to stick some code in ComboBox1_Change() event with
the goal of populating the list box
with products correspopnding to your selection.

I dont know your Data but in general terms the combox change event would
do the following actions once the user form had been called


1) Clear the list box for example ListBox1.clear

2) Set a variable = to the Comboxbox selection

3) Programatically locate the product range and array all members which
index against the variable set in 2) above

You can use many tricks to do this range or cell offset comparisons
using if statments to parse out products not corresponding to the catgory
criteria

4) Using additem populate the list box. from the array created in 3)


Something like this where the data sheet has column eE polulated with with
categories andcolumn E is populatyed with corresponding products


Private Sub ComboBox1_Change()

ListBox1.Clear

Dim aaa As String
aaa = ComboBox1.Value


Range("D1").Select
Range(Selection, Selection.End(xlDown)).Select

Dim task As Range
Dim prod As String
Set task = Selection

For Each cell In task
prod = ""
If cell.Value = aaa Then prod = cell.Offset(0, 1).Value
If prod < "" Then ListBox1.AddItem prod
Next

End Sub


I wish I could be more specific, so I hope this attempt atl east gets you
going in the right direction.




Best

N10



You now need some code in your


I meant column E and column D

N10


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
Product Code and Product Description setup Nastyashman Excel Worksheet Functions 4 July 6th 09 05:48 PM
I need a product key for my Trail product, 2007 Microsoft Office s sltchsyi Setting up and Configuration of Excel 0 May 4th 09 01:32 AM
Vlookup code product and to copy commentary with photo of the product in vba [email protected] Excel Programming 0 October 2nd 06 03:54 AM
how do i manage without having to retype Cynthia Excel Discussion (Misc queries) 3 August 24th 06 06:42 PM
Creating a Product DATABASE in ACCESS or EXCEL and then retrieving Abe Excel Discussion (Misc queries) 1 February 25th 06 03:09 AM


All times are GMT +1. The time now is 01:52 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"