Sub budgethistory()
Dim myKey, myMessage, myTitle
myMessage = "Which month are you entering? Enter month as a number."
myTitle = "History"
myKey = InputBox(myMessage, myTitle)
Sheets("PivotData").Activate
Range("ammountthisperiod").Select
Selection.Copy
monthnum = myKey
Range("hist").Offset(0, monthnum - 1).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Dim Arr As Variant
Dim i As Long
Dim Wsht As Worksheet
Arr = Array("E19", "E52", "E85", "E118", "E151", "E184", "E217", "E249")
For Each Wsht In Worksheets
Select Case UCase(Wsht.Name)
Case "pivotdata", "sumtable"
'
Case Else
For i = 0 To UBound(Arr)
Wsht.Range(Arr(i)).ClearContents
Next i
End Select
Next Wsht
End Sub
I have a problem with my code written above. this section:
Select Case UCase(Wsht.Name)
Case "pivotdata", "sumtable"
'
is not working and the array i have named is being deleted on this worksheet as well. i want to be able to input the worksheets ex. pivotdata, sumtable and have them be pardoned from the deleting. any thoughts?
thanks
-dillon
Bookmarks