I recorded a macro which has been working for at least a week but is no longer working for some reason. Today when I went through my workbook to make sure everything was working, I received an "Application-defined or Object-defined error" message when selecting a macro from a drop down menu. I don't understand why a macro would work and then stop working all of a sudden let alone how a recorded macro could stop working. The workbook I am working on is a project budget template. I have a drop down menu with each selection running macros in the first tab (SERVICES is the second tab). The macro below is one of the macros that are called from several of the drop down selections. Different projects have different roles and rates - the macro below is to change the roles for a different type of project.
I'm sorry for posting a question without trying anything but honestly don't know even know how to start. I'm newer to VBA so this is quite confusing for me.
Sub CompanyARolestoRolesColumnInServicesTab()
Call TurnOffFunctions
' CompanyA_AddRolesAtoRolesColumnInServicesTab Macro
Sheets("SERVICES").Select
Range("C29").Select
Application.CutCopyMode = False
Application.CutCopyMode = False
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$K$374:$K$417"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Selection.Copy
Range( _
"C30:C48,C50:C69,C71:C90,C92:C111,C113:C132,C134:C153,C155:C174,C176:C195,C197:C216,C218:C237,C239:C258,C260:C279,C281:C300,C302:C321,C323:C342,C344:C363" _
).Select
Range("C344").Activate
ActiveSheet.Paste
Range("A1").Select
Sheets("SOW").Select
Call NoSelect
Call TurnOnFunctions
End Sub
The section of the macro which becomes highlighted after the error message and after pressing debug is this:
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$K$374:$K$417"