|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
VB Macro Help
I need to know if there is a way to incorporate a drop down menu into a VB macro.
Here is a sample of what I believe I am looking for: Sub Source_Data_Test() ' ' Source_Data_Test Macro ' Macro recorded 9/7/2007 by n1665604 ' ' Sheets("ERM1").Select ActiveSheet.ChartObjects("MMS ERMs 2").Activate ActiveWindow.Visible = False Windows("ALL_CIR_SINGLE_SV.xls").Activate ActiveSheet.ChartObjects("MMS ERMs 1").Activate ActiveChart.ChartArea.Select ActiveChart.SeriesCollection(1).XValues = "=[ERMs.xls]SV025!R4C1:R369C1" ActiveChart.SeriesCollection(1).Values = "=[ERMs.xls]SV025!R4C53:R369C53" ActiveChart.SeriesCollection(2).XValues = "=[ERMs.xls]SV025!R4C1:R369C1" ActiveChart.SeriesCollection(2).Values = "=[ERMs.xls]SV025!R4C54:R369C54" ActiveChart.SeriesCollection(3).XValues = "=[ERMs.xls]SV025!R4C1:R369C1" ActiveChart.SeriesCollection(3).Values = "=[ERMs.xls]SV025!R4C55:R369C55" ActiveChart.SeriesCollection(4).XValues = "=[ERMs.xls]SV025!R4C1:R369C1" ActiveChart.SeriesCollection(4).Values = "=[ERMs.xls]SV025!R4C56:R369C56" ActiveChart.SeriesCollection(5).XValues = "=[ERMs.xls]SV025!R4C1:R369C1" ActiveChart.SeriesCollection(5).Values = "=[ERMs.xls]SV025!R4C57:R369C57" ActiveWindow.Visible = False Windows("ALL_CIR_SINGLE_SV.xls").Activate ActiveSheet.ChartObjects("MMS ERMs 2").Activate ActiveChart.ChartArea.Select ActiveChart.SeriesCollection(1).XValues = "=[ERMs.xls]SV045!R4C1:R369C1" ActiveChart.SeriesCollection(1).Values = "=[ERMs.xls]SV045!R4C58:R369C58" ActiveChart.SeriesCollection(2).XValues = "=[ERMs.xls]SV045!R4C1:R369C1" ActiveChart.SeriesCollection(2).Values = "=[ERMs.xls]SV045!R4C61:R369C61" ActiveChart.SeriesCollection(3).XValues = "=[ERMs.xls]SV045!R4C1:R369C1" ActiveChart.SeriesCollection(3).Values = "=[ERMs.xls]SV045!R4C66:R369C66" ActiveWindow.Visible = False Windows("ALL_CIR_SINGLE_SV.xls").Activate Sheets("Sheet10").Select End Sub This is a sample of the code I have in my script. I have a drop down list that contains different values for the text highlighted in red. What I want to do is select a value from my drop down list, and when I run my macro I want it to use the value I chose from my drop down menu. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > VB Macro Help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|