Below is my code to link and display values from "avg" sheet to a Text Box's 1-6 at D.I. sheet chart. However I want to make values of x,y,z,x1,y1,z1 variables or can be assigned another variables that not contain open/close quotation mark. In order to customize what rows and column from "avg" sheet to display to a Text Box 1-6. You know if properties object containing quotation mark it became a string even if it is declared as integer or long.
If I change the x="avg!a68" to a Sheets("avg").Cells(68,1).Value so that rows and column became cells or assignable with variable, but it did not work.
Thanks....
Sub Update()
Dim x As String
Dim y As String
Dim z As String
x = "avg!a68"
y = "avg!a69"
z = "avg!a70"
x1 = "avg!bo68"
y1 = "avg!bo69"
z1 = "avg!bo70"
Sheets("D.I.").Select
ActiveChart.Shapes("Text Box 1").Select
Selection.Formula = x
ActiveChart.Shapes("Text Box 2").Select
Selection.Formula = y
ActiveChart.Shapes("Text Box 3").Select
Selection.Formula = z
ActiveChart.Shapes("Text Box 4").Select
Selection.Formula = x1
ActiveChart.Shapes("Text Box 5").Select
Selection.Formula = y1
ActiveChart.Shapes("Text Box 6").Select
Selection.Formula = z1
If I change the x="avg!a68" to a Sheets("avg").Cells(68,1).Value so that rows and column became cells or assignable with variable, but it did not work.
Thanks....
Sub Update()
Dim x As String
Dim y As String
Dim z As String
x = "avg!a68"
y = "avg!a69"
z = "avg!a70"
x1 = "avg!bo68"
y1 = "avg!bo69"
z1 = "avg!bo70"
Sheets("D.I.").Select
ActiveChart.Shapes("Text Box 1").Select
Selection.Formula = x
ActiveChart.Shapes("Text Box 2").Select
Selection.Formula = y
ActiveChart.Shapes("Text Box 3").Select
Selection.Formula = z
ActiveChart.Shapes("Text Box 4").Select
Selection.Formula = x1
ActiveChart.Shapes("Text Box 5").Select
Selection.Formula = y1
ActiveChart.Shapes("Text Box 6").Select
Selection.Formula = z1