![]() |
Error 438
Why is this giving me runtime error 438?
Sub ComboBox6_Change() If Sheets("Main Menu").ComboBox6.Value = "Main Menu" Then Call DisplayMenu If Sheets("Main Menu").ComboBox6.Value = "Goals" Then Call DisplayGoals If Sheets("Main Menu").ComboBox6.Value = "Development Plan" Then Call DisplayDevPlan If Sheets("Main Menu").ComboBox6.Value = "Mid-Year" Then Call DisplayMidYear If Sheets("Main Menu").ComboBox6.Value = "Self-Evaluation" Then Call DisplaySelfEval If Sheets("Main Menu").ComboBox6.Value = "Functional Manager" Then Call DisplayFunctionalMgr If Sheets("Main Menu").ComboBox6.Value = "Manager" Then Call DisplayManager End Sub Anyone? |
Error 438
m,
Is the ComboBox from the Control Tool Box and not from the Forms toolbar ? Does the sheet have the exact name "Main Menu" ? Is the code located in the sheet module ? Is the combobox actually named "ComboBox6" ? Does it work if you replace...Sheets("Main Menu") with...Me ? Jim Cone San Francisco, USA wrote in message oups.com Why is this giving me runtime error 438? Sub ComboBox6_Change() If Sheets("Main Menu").ComboBox6.Value = "Main Menu" Then Call DisplayMenu If Sheets("Main Menu").ComboBox6.Value = "Goals" Then Call DisplayGoals If Sheets("Main Menu").ComboBox6.Value = "Development Plan" Then Call DisplayDevPlan If Sheets("Main Menu").ComboBox6.Value = "Mid-Year" Then Call DisplayMidYear If Sheets("Main Menu").ComboBox6.Value = "Self-Evaluation" Then Call DisplaySelfEval If Sheets("Main Menu").ComboBox6.Value = "Functional Manager" Then Call DisplayFunctionalMgr If Sheets("Main Menu").ComboBox6.Value = "Manager" Then Call DisplayManager End Sub Anyone? |
Error 438
Jim,
From the control toolbox, yes. I edited the code a bit (see below) and now nothing at all is happening when I select something from the dropdown menu.... what do you think? Sub ComboBox6() If Sheets("Competencies").ComboBox6.Value = "Main Menu" Then Call DisplayMenu If Sheets("Competencies").ComboBox6.Value = "Goals" Then Call DisplayGoals If Sheets("Competencies").ComboBox6.Value = "Development Plan" Then Call DisplayDevPlan If Sheets("Competencies").ComboBox6.Value = "Mid-Year" Then Call DisplayMidYear If Sheets("Competencies").ComboBox6.Value = "Self-Evaluation" Then Call DisplaySelfEval If Sheets("Competencies").ComboBox6.Value = "Functional Manager" Then Call DisplayFunctionalMgr If Sheets("Competencies").ComboBox6.Value = "Manager" Then Call DisplayManager End Sub |
Error 438
m,
I think that the sheet name should be the name of the sheet that the combobox is on. I also think that the code belongs in the code module behind the sheet (right-click the sheet tab and select "view code"). Jim Cone wrote in message oups.com Jim, From the control toolbox, yes. I edited the code a bit (see below) and now nothing at all is happening when I select something from the dropdown menu.... what do you think? Sub ComboBox6() If Sheets("Competencies").ComboBox6.Value = "Main Menu" Then Call DisplayMenu If Sheets("Competencies").ComboBox6.Value = "Goals" Then Call DisplayGoals If Sheets("Competencies").ComboBox6.Value = "Development Plan" Then Call DisplayDevPlan If Sheets("Competencies").ComboBox6.Value = "Mid-Year" Then Call DisplayMidYear If Sheets("Competencies").ComboBox6.Value = "Self-Evaluation" Then Call DisplaySelfEval If Sheets("Competencies").ComboBox6.Value = "Functional Manager" Then Call DisplayFunctionalMgr If Sheets("Competencies").ComboBox6.Value = "Manager" Then Call DisplayManager End Sub |
All times are GMT +1. The time now is 12:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com