Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help with VBA

Hello
I am pretty new to VBA and would appreciate some help...

1) I want to know if the standard controls that come along with Excel 2000 /
2002 professional allow for drop down lists with multi-elements sourced from
a database ?
2) Are there are also similar multi-element listboxes.

for e.g. Category Table has category ID, Category Name, DateCreated,
DateModified, Weight, FlagActivated.

I want the dropdown box to display CategoryName and weight, sourced from
the database. Same applies to the list box.
Can i do this with the standard controls..

3) The user also has a requirement for displaying detailed information (more
like a summary). The requirement is to use some form of grid. The data
source is a consolidation of data across multiple tables. For e.g.

Category Name
Category Weight
Criterion Description
Criterion Points.
...

Summary
Total Points...

Is there a grid that will allow me to do this? Also can i use the microsoft
spreadsheet control itself within an Excel User form?

Any pointers, sources will be greatly appreciated..

Thanks
Martin


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Help with VBA


"Martin SChukrazy" wrote in message
...
Hello
I am pretty new to VBA and would appreciate some help...

1) I want to know if the standard controls that come along with Excel 2000

/
2002 professional allow for drop down lists with multi-elements sourced

from
a database ?


Not directly. Excel can source a drop-down from a range on a worksheet, but
not a database. To do this you would need tgo colde it to either pull from
the database and load the drop-down, or pull from a database, load onto a
worksheet range, and link to that range. Clearly, there is no dynamic
element i n this such that if the database changes, other that what you as
the programmer builds in.


2) Are there are also similar multi-element listboxes.

for e.g. Category Table has category ID, Category Name, DateCreated,
DateModified, Weight, FlagActivated.


Do you mean that if a category is selected from DD#1, then DD#2 will be
loaded with the categories associated with that id, and it it changes then
DD#2 also changes? If so, then no, this is again not automatic and needs to
be coded.

If you mean seeing the multiple columns in the DD, then this is posisble
with a control toolbar dropdown (don't know about forms DD, don't use them).
In this scenario, you set the ColumnCount property to the number of columns,
and direct the ListFillrange property to the multiple column worksheet data
range. To get the data, this is an example click event that displays the
first and second column

Private Sub ComboBox1_Change()
With ComboBox1
MsgBox .Value & .List(.ListIndex, 1)
End With
End Sub


3) The user also has a requirement for displaying detailed information

(more
like a summary). The requirement is to use some form of grid. The data
source is a consolidation of data across multiple tables. For e.g.

Category Name
Category Weight
Criterion Description
Criterion Points.
...

Summary
Total Points...

Is there a grid that will allow me to do this? Also can i use the

microsoft
spreadsheet control itself within an Excel User form?


There are a number of datagrid controls around, but examples of using them
seems to be sparse. Here is a coupl of alternative approaches in a previous
post http://tinyurl.com/35gmk


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Help with VBA

By 'multi-element' do you mean 'more than one column'? If so, the
answers you require a

1) MsForms.ComboBox

2) MsForms.ListBox

3) No data grid ActiveX control ships with Excel, AFAIK. Someone once
suggested here that an Excel worksheet makes an idea grid...

--

"Martin SChukrazy" wrote in message ...
Hello
I am pretty new to VBA and would appreciate some help...

1) I want to know if the standard controls that come along with Excel 2000 /
2002 professional allow for drop down lists with multi-elements sourced from
a database ?
2) Are there are also similar multi-element listboxes.

for e.g. Category Table has category ID, Category Name, DateCreated,
DateModified, Weight, FlagActivated.

I want the dropdown box to display CategoryName and weight, sourced from
the database. Same applies to the list box.
Can i do this with the standard controls..

3) The user also has a requirement for displaying detailed information (more
like a summary). The requirement is to use some form of grid. The data
source is a consolidation of data across multiple tables. For e.g.

Category Name
Category Weight
Criterion Description
Criterion Points.
...

Summary
Total Points...

Is there a grid that will allow me to do this? Also can i use the microsoft
spreadsheet control itself within an Excel User form?

Any pointers, sources will be greatly appreciated..

Thanks
Martin

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



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