Re: Executing Macro Help
- From: alexdetrano@xxxxxxxxx
- Date: 30 Apr 2007 22:19:40 -0700
yes, that is correct. I have the combo box always present, so that
even if I change tabs, I have the option of choosing a scenario.
Currently, when I pick a scenario, the macro is executed on the
current work***. This is no good, as it overwrites things that are
there. So I need the macro to change only the cells in the rev
work***. I'm thinking I need to change the lines inside the macro
to have the rev title in front of the cell, but I'm not sure how to do
this. Here's my code for the rev page
Private Sub ComboBox1_Change()
Select Case Me.ComboBox1.Value
Case "basic": Call base
Case "increased": Call Increased
Case "decreased": Call Reduced
Case "superior": Call Superior
Case "inferior": Call Inferior
End Select
End Sub
Private Sub Worksheet_Activate()
cboScenario.Show vbModeless
End Sub
-----------------
here is my code for the macro called basic (which is an option in the
combo box)
Sub base()
'
' base Macro
' Macro recorded 4/16/2007 by User
'
'
Range("B83").Select
ActiveCell.FormulaR1C1 = "415"
Range("B84").Select
ActiveCell.FormulaR1C1 = "235"
Range("B85").Select
ActiveCell.FormulaR1C1 = "50"
Range("B86").Select
ActiveCell.FormulaR1C1 = "25"
Range("B87").Select
ActiveCell.FormulaR1C1 = "75"
Range("B88").Select
ActiveCell.FormulaR1C1 = "70"
Range("B89").Select
ActiveCell.FormulaR1C1 = "98"
Range("B90").Select
ActiveCell.FormulaR1C1 = "126"
Range("A90").Select
ActiveCell.FormulaR1C1 = "Occupancy-90% -3RD "
Range("A89").Select
ActiveCell.FormulaR1C1 = "Occupancy-70% -2ND"
Range("A88").Select
ActiveCell.FormulaR1C1 = "Occupancy-50% -1ST 4 MO."
End Sub
.
- Follow-Ups:
- Re: Executing Macro Help
- From: Gary Keramidas
- Re: Executing Macro Help
- References:
- Executing Macro Help
- From: alexdetrano
- RE: Executing Macro Help
- From: Leung
- Executing Macro Help
- Prev by Date: requirement for creating a sub menu in c# excel addin
- Next by Date: RE: Unable to prevent copy/paste of protected work*** into new d
- Previous by thread: RE: Executing Macro Help
- Next by thread: Re: Executing Macro Help
- Index(es):