VBA Code Dilemma

  • Thread starter babyatx13 via AccessMonster.com
  • Start date
B

babyatx13 via AccessMonster.com

I have a form with a combo box and a button on it. The combo box looks up a
number for a certain file set. Based on this number I am opening a file in
excel where the file name corresponds to this number. This I can do. However,
my customer wants to have more than one combo box on this form and each combo
box do the same function for each different file set numbers, when the one
button is clicked. How can I do this without duplicating all the same code?

Thanks KBoard
 
S

SteveS

More info, please...

What code do you have for the button?
What is the name(s) if the combo box(es)?
Examples of file set file names?
Currently, is more than one Excel sheet opened for a file set when the
button is clicked?


Depending on how you name the combo boxes, you could use a loop to check
each of the combo boxes.... if NULL skip else open the file.

Or you could use a series of If() function to check if the combo box is NULL
- skip else open the Excel file..
 
Top