Hi all!
I am not familiar with VBscript at all, so please go easy on me. There is a document I've been working on in Excel for quite some time, but another person added in some macros.
Basically, the first macro looks for a defined date within one of the worksheets and changes the date within the headers on all pages.
After that, there are various macros set that change the titles of different charts. For example, one chart may be titled, "Surveys Returned = #" and it will go to another worksheet, look for the defined #, and then insert it into the title.
There are 8 macros of this sort that have worked fine up until now.
Now I have an actual worksheet that has a chart inserted into it, so it's actually lying on top of the cells instead of being a separate chart sheet (it has to be this way for a few reasons).
The following code is how we've been changing the titles in these charts when they're simply chart sheets:
Sub Macro10()
'
' Macro10 Macro
' Batch Work BW
'
Sheets("Survey Data Tables").Select
Range("B4").Select
I = ActiveCell.Value
Sheets("Batch Work BW").Select
ActiveChart.ChartTitle.Select
Application.CutCopyMode = False
Selection.Characters.Text = "Surveys By Channel Received: Batchwork" & Chr(10) & "Total Mailed for Channel Received: Batchwork = " & H & Chr(10) & "" & Chr(10) & ""
Selection.AutoScaleFont = False
With Selection.Characters(Start:=1, Length:=41).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
End Sub
I need to take this code and change it so it actually points to the chart within the worksheet. How do I go about doing that?
Bookmarks