BettyBoop0916
New Member
- Joined
- May 20, 2011
- Messages
- 16
Hi there,
I have a small problem. I am trying to have a macro run from a drop down list that I created through data validation.
The macro I am trying to run is as follows:
Sub GasAndOil()
ActiveSheet.Unprotect
Rows(ActiveCell.Row & ":" & ActiveCell.Row + 5).Select
Selection.Delete
Worksheets("Data").Visible = True
Sheets("Data").Select
Sheets("Data").Range("C9:I15").Select
Selection.Copy
Sheets(Index).Select
Selection.Insert
Worksheets("Data").Visible = False
ActiveSheet.Protect
End Sub
Now...I want this macro to run when I select "(5675) Gas & Oil - Regina" from a drop down list. This drop down list can be in any row in column A...it really just depends on where I put my cursor.
Does anyone have any ideas on how I can have it call this macro?
Thanks!
I have a small problem. I am trying to have a macro run from a drop down list that I created through data validation.
The macro I am trying to run is as follows:
Sub GasAndOil()
ActiveSheet.Unprotect
Rows(ActiveCell.Row & ":" & ActiveCell.Row + 5).Select
Selection.Delete
Worksheets("Data").Visible = True
Sheets("Data").Select
Sheets("Data").Range("C9:I15").Select
Selection.Copy
Sheets(Index).Select
Selection.Insert
Worksheets("Data").Visible = False
ActiveSheet.Protect
End Sub
Now...I want this macro to run when I select "(5675) Gas & Oil - Regina" from a drop down list. This drop down list can be in any row in column A...it really just depends on where I put my cursor.
Does anyone have any ideas on how I can have it call this macro?
Thanks!