Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default VB Script based on combobox selection

Hi

I have a combobox with various items like 2005, 2006, 2005 Q1,
2005Q2, Business. Combobox is called Combobox1 and in Sheet5

I have a common VB code .

ActiveSheet.Evaluate("SUM(IF($CU$7:$CU$4978=2006 ,IF($K$7:$K
$4978=""Accept-Create New Project"",$G$7:$G$4978,0),0))")

In the above code I have hardcoded it for 2006. But I need to change
the 2006 with what ever user selects in combobox.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default VB Script based on combobox selection

ActiveSheet.Evaluate("SUM(IF($CU$7:$CU$4978=" & ComboBox1.Value & _
" ,IF($K$7:$K$4978=""Accept-Create New Project"",$G$7:$G$4978,0),0))")

--
Charles Chickering

"A good example is twice the value of good advice."


"gmac" wrote:

Hi

I have a combobox with various items like 2005, 2006, 2005 Q1,
2005Q2, Business. Combobox is called Combobox1 and in Sheet5

I have a common VB code .

ActiveSheet.Evaluate("SUM(IF($CU$7:$CU$4978=2006 ,IF($K$7:$K
$4978=""Accept-Create New Project"",$G$7:$G$4978,0),0))")

In the above code I have hardcoded it for 2006. But I need to change
the 2006 with what ever user selects in combobox.


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
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
change combobox values one by one based on selection in multiselect listbox Abdul[_2_] Excel Programming 0 November 7th 06 11:55 AM
Combobox items determined by the selection in another combobox Alerion Excel Programming 2 September 13th 06 01:07 PM
Combobox options based on the input of another combobox afmullane[_5_] Excel Programming 1 May 3rd 06 01:44 PM
Excel - Copy range of cells based on Combobox Selection Excel-erate2004 Excel Programming 2 April 3rd 04 05:35 PM


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