Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA Coding (?)

I am adding a couple of combo boxes to my spreadsheet, one is a list of
Rules, the other combo box list items will depend upon which rule is selected.

For example if the user selects "Confined Space Entry" then the Details box
will have a list of details that only relate to that rule.

What I am thinking needs to be done is have VBA code written that will say
something like this:

if cell(A49).value = 6
then combobox123 ?????

here is where I need help. I am not a stranger to VB programming, just how
to use it with office products.

I have a separate sheet that is the storage area for all the lists that I am
using. So I am assuming that I need to make the second list box's value range
dependent upon which item is selected in list box 1.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default VBA Coding (?)

You presumably have two combo boxes say cbo1 and cbo2
If the items in cbo2 depend on the selection made in cbo1 then you have to
write a procedure, say RefreshListIncbo2, which will take a single parameter
- a string value, the item selected in cbo1, and populate cbo2.

Sub RefreshListIncbo2(Byval sItemInCbo1 as String)
'does things like clear the existing cbo2 and populates it again
'based on sItemInCbo1
End Sub

This Sub should be called from the Cbo1_Change event
Private Sub Cbo1_Change()
RefreshListInCbo2 Sheet1.Cbo1.Text
End Sub

Hope this is clear

Alok Joshi
"Larry G." wrote:

I am adding a couple of combo boxes to my spreadsheet, one is a list of
Rules, the other combo box list items will depend upon which rule is selected.

For example if the user selects "Confined Space Entry" then the Details box
will have a list of details that only relate to that rule.

What I am thinking needs to be done is have VBA code written that will say
something like this:

if cell(A49).value = 6
then combobox123 ?????

here is where I need help. I am not a stranger to VB programming, just how
to use it with office products.

I have a separate sheet that is the storage area for all the lists that I am
using. So I am assuming that I need to make the second list box's value range
dependent upon which item is selected in list box 1.


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
sum by coding without 0 kaja New Users to Excel 2 March 1st 08 03:52 PM
How to fix the coding? Eric Excel Worksheet Functions 0 February 26th 08 03:38 AM
Coding metaltecks Excel Discussion (Misc queries) 1 April 17th 06 10:12 PM
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? StargateFan[_3_] Excel Programming 10 October 6th 05 01:18 PM
API coding Sheela Excel Programming 3 August 30th 03 02:17 AM


All times are GMT +1. The time now is 06:19 PM.

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"