VBA Code Dilemma

  • Thread starter Thread starter babyatx13 via AccessMonster.com
  • Start date 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
 
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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top