jsabo
09-14-2015, 03:41 PM
Hey guys,
Trying to have a combobox on a splash screen, where depending on what is selected, variables are assigned certain values. Here is what I've got:
Sub LaunchGen()
'
' LaunchGen Macro
'
'
Dim QD As Shape
Dim sht As Worksheet
Set sht = ThisWorkbook.Worksheets("Generator")
Set QD = sht.Shapes("QuarterDropdown")
Select Case QtrYr
Case QD.Value = "Q1 2015"
YearQTR = "20151"
SummaryString = "Scorecard - 1st Quarter 2015"
CostString = "Cost - 1st Quarter 2015"
QualityString = "Quality - 1st Quarter 2015"
ScheduleString = "Schedule - 1st Quarter 2015"
Case QD.Value = "Q2 2015"
YearQTR = "20152"
SummaryString = "Scorecard - 2nd Quarter 2015"
CostString = "Cost - 2nd Quarter 2015"
QualityString = "Quality - 2nd Quarter 2015"
ScheduleString = "Schedule - 2nd Quarter 2015"
Case QD.Value = "Q3 2015"
YearQTR = "20153"
SummaryString = "Scorecard - 3rd Quarter 2015"
CostString = "Cost - 3rd Quarter 2015"
QualityString = "Quality - 3rd Quarter 2015"
ScheduleString = "Schedule - 3rd Quarter 2015"
End Select
GenerateScorecard
End Sub
The error I get is: "Object doesn't support this property or method".
Any ideas? Thanks.
EDIT: Got what I needed. Made it an ActiveX combobox and did this:
Select Case QtrYr
Case Sheets("Generator").QuarterDropdown.Value = "Q1 2015"
YearQTR = "20151"
SummaryString = "Scorecard - 1st Quarter 2015"
CostString = "Cost - 1st Quarter 2015"
QualityString = "Quality - 1st Quarter 2015"
ScheduleString = "Schedule - 1st Quarter 2015"
Case Sheets("Generator").QuarterDropdown.Value = "Q2 2015"
YearQTR = "20152"
SummaryString = "Scorecard - 2nd Quarter 2015"
CostString = "Cost - 2nd Quarter 2015"
QualityString = "Quality - 2nd Quarter 2015"
ScheduleString = "Schedule - 2nd Quarter 2015"
Case Sheets("Generator").QuarterDropdown.Value = "Q3 2015"
YearQTR = "20153"
SummaryString = "Scorecard - 3rd Quarter 2015"
CostString = "Cost - 3rd Quarter 2015"
QualityString = "Quality - 3rd Quarter 2015"
ScheduleString = "Schedule - 3rd Quarter 2015"
Trying to have a combobox on a splash screen, where depending on what is selected, variables are assigned certain values. Here is what I've got:
Sub LaunchGen()
'
' LaunchGen Macro
'
'
Dim QD As Shape
Dim sht As Worksheet
Set sht = ThisWorkbook.Worksheets("Generator")
Set QD = sht.Shapes("QuarterDropdown")
Select Case QtrYr
Case QD.Value = "Q1 2015"
YearQTR = "20151"
SummaryString = "Scorecard - 1st Quarter 2015"
CostString = "Cost - 1st Quarter 2015"
QualityString = "Quality - 1st Quarter 2015"
ScheduleString = "Schedule - 1st Quarter 2015"
Case QD.Value = "Q2 2015"
YearQTR = "20152"
SummaryString = "Scorecard - 2nd Quarter 2015"
CostString = "Cost - 2nd Quarter 2015"
QualityString = "Quality - 2nd Quarter 2015"
ScheduleString = "Schedule - 2nd Quarter 2015"
Case QD.Value = "Q3 2015"
YearQTR = "20153"
SummaryString = "Scorecard - 3rd Quarter 2015"
CostString = "Cost - 3rd Quarter 2015"
QualityString = "Quality - 3rd Quarter 2015"
ScheduleString = "Schedule - 3rd Quarter 2015"
End Select
GenerateScorecard
End Sub
The error I get is: "Object doesn't support this property or method".
Any ideas? Thanks.
EDIT: Got what I needed. Made it an ActiveX combobox and did this:
Select Case QtrYr
Case Sheets("Generator").QuarterDropdown.Value = "Q1 2015"
YearQTR = "20151"
SummaryString = "Scorecard - 1st Quarter 2015"
CostString = "Cost - 1st Quarter 2015"
QualityString = "Quality - 1st Quarter 2015"
ScheduleString = "Schedule - 1st Quarter 2015"
Case Sheets("Generator").QuarterDropdown.Value = "Q2 2015"
YearQTR = "20152"
SummaryString = "Scorecard - 2nd Quarter 2015"
CostString = "Cost - 2nd Quarter 2015"
QualityString = "Quality - 2nd Quarter 2015"
ScheduleString = "Schedule - 2nd Quarter 2015"
Case Sheets("Generator").QuarterDropdown.Value = "Q3 2015"
YearQTR = "20153"
SummaryString = "Scorecard - 3rd Quarter 2015"
CostString = "Cost - 3rd Quarter 2015"
QualityString = "Quality - 3rd Quarter 2015"
ScheduleString = "Schedule - 3rd Quarter 2015"