#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 313
Default Combo Box

I have the following code that is embedded on a page that updates a Pivot
Table bases on a "State" selection. Is there a way to code a second ComboBox
on the same page to execute the "Private Sub ComboBox01_Change()"
programming. For example if Combox02_Change selects a metric such as "Sales
or Quotes" once the person picks Sales it would then also run through the
"Private Sub ComboBox01_Change()" procedure and pick the State again.

Private Sub ComboBox01_Change()
Dim sel_st
sel_st = Evaluate("state2").Value
Worksheets("Pivot1").PivotTables("PVTState").Pivot Fields("[DMA within
State]").CurrentPageName _
= sel_st
etc......

I guess what I am trying to do is find the code that is similar to the
Application.Run language that I use to run a macro within a macro.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Combo Box

If you change the declaration from Private to Public you can just do

Combobox01_change

in your code to execute this event.

--
Regards,
Tom Ogilvy


"Tony" wrote in message
...
I have the following code that is embedded on a page that updates a Pivot
Table bases on a "State" selection. Is there a way to code a second

ComboBox
on the same page to execute the "Private Sub ComboBox01_Change()"
programming. For example if Combox02_Change selects a metric such as

"Sales
or Quotes" once the person picks Sales it would then also run through the
"Private Sub ComboBox01_Change()" procedure and pick the State again.

Private Sub ComboBox01_Change()
Dim sel_st
sel_st = Evaluate("state2").Value
Worksheets("Pivot1").PivotTables("PVTState").Pivot Fields("[DMA within
State]").CurrentPageName _
= sel_st
etc......

I guess what I am trying to do is find the code that is similar to the
Application.Run language that I use to run a macro within a macro.



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
How do I create a combo box that is tied to another combo box? rosamaria Excel Worksheet Functions 2 December 9th 09 10:32 PM
linking a form combo box... results from the combo box to another Trey Excel Discussion (Misc queries) 1 July 15th 07 01:58 AM
combo reference on another combo box for picking address etc. kbjin Excel Worksheet Functions 1 December 8th 06 03:29 PM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 1 February 16th 05 02:05 AM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 0 February 15th 05 07:45 PM


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