Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default combo box + option all + use all functions when this is pressed

I have a combo box that contains: 1, 2, 3, and all. These represent
different situations. So for situation 1, it should do function 1. For
all I want to be able to do all 3 functions.

ok. Now I have a functions that are called: function 1, function 2,
function 3 and function all

if I say:

if combo_box.value=all then
for i=1 to 3
controls("function "& i
next i
end if

See what I mean... how can I use functions in a for loop and just
assign the index....

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default combo box + option all + use all functions when this is pressed

Function names are not held as strings :
e.g. Call MyFunction1(args)
Or RetVal=MyFunction1()
so you cannot build the name with a variable like that.

But maybe you can use Application.Run "MyFunction" & i instead.
The functions need to be in a module for this to work.

NickHK

"Monte0682" wrote in message
ups.com...
I have a combo box that contains: 1, 2, 3, and all. These represent
different situations. So for situation 1, it should do function 1. For
all I want to be able to do all 3 functions.

ok. Now I have a functions that are called: function 1, function 2,
function 3 and function all

if I say:

if combo_box.value=all then
for i=1 to 3
controls("function "& i
next i
end if

See what I mean... how can I use functions in a for loop and just
assign the index....



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
No range option in format control for combo box Sai Krishna[_2_] Excel Worksheet Functions 1 January 2nd 08 11:37 AM
Look up Values from other file based on combo box's option Jac Excel Discussion (Misc queries) 2 July 1st 07 12:59 PM
Combo Box "LinkedCell" option Patty via OfficeKB.com Excel Discussion (Misc queries) 0 August 2nd 05 10:01 PM
Form Option Buttons and Combo Boxes in VBA Newboy18 Excel Programming 1 June 30th 04 10:16 PM
Control which option is visible in Combo boxes Sebastian Axelsson Excel Programming 1 March 5th 04 02:00 PM


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