Hello,
I've created a chart embedded in a sheet. After formatting, I'm trying to give focus back to spreadsheet. I've tried Sheets.activate .Select and even Sendkeys "{ESC}". Nothing works and I dont' want to select range b/c I don't know what it is through each iteration.
THis is what I've got...
Charts.Add
ActiveChart.Location Where:=xlLocationAsObject, Name:="TOnly"
ActiveChart.ChartType = xlLine
If i < 7 Then
RngStart = Left(RngStart, 1) & ":" & Mid(RngStart, 2, 2)
RngEnd = Left(RngEnd, 1) & ":" & Mid(RngEnd, 2, 2)
Else: RngStart = Left(RngStart, 2) & ":" & Mid(RngStart, 3, 2)
RngEnd = Left(RngEnd, 2) & ":" & Mid(RngEnd, 3, 2)
End If
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = RngStart & " - " & RngEnd
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
.HasLegend = False
End With
Sheets("5_min").select '???
I've created a chart embedded in a sheet. After formatting, I'm trying to give focus back to spreadsheet. I've tried Sheets.activate .Select and even Sendkeys "{ESC}". Nothing works and I dont' want to select range b/c I don't know what it is through each iteration.
THis is what I've got...
Charts.Add
ActiveChart.Location Where:=xlLocationAsObject, Name:="TOnly"
ActiveChart.ChartType = xlLine
If i < 7 Then
RngStart = Left(RngStart, 1) & ":" & Mid(RngStart, 2, 2)
RngEnd = Left(RngEnd, 1) & ":" & Mid(RngEnd, 2, 2)
Else: RngStart = Left(RngStart, 2) & ":" & Mid(RngStart, 3, 2)
RngEnd = Left(RngEnd, 2) & ":" & Mid(RngEnd, 3, 2)
End If
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = RngStart & " - " & RngEnd
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
.HasLegend = False
End With
Sheets("5_min").select '???