Greetings,
I am running into a Method 'Range' of object'_Global' failed error in my macro below
I am receiving the error on line:
I suspect it has something to do with the sheet name and possibly variable type. Any ideas why this might be?
I am running into a Method 'Range' of object'_Global' failed error in my macro below
Code:
Dim AA as String: AA = ActiveSheet.Name
ActiveSheet.Activate
Range("A4:K300").Select
ActiveSheet.Shapes.AddChart2(227,xlLine).Select
ActiveChart.SetSourceData Source:=Range("AA!$A$4:$K$300")
ActiveChart.Location Where:=xlLocationAsNewSheet
I am receiving the error on line:
Code:
ActiveChart.SetSourceData Source:=Range("AA!$A$4:$K$300")
I suspect it has something to do with the sheet name and possibly variable type. Any ideas why this might be?