K
kittronald
Why does setting the RefersTo value cause a run-time error 1004 ?
Sub Macro_Change_Function()
'
' Macro_Change_Function Macro
'
'
If Sheet2.CheckBoxes("Check Box 23").Value = False Then
Sheet2.CheckBoxes("Check Box 23").Value = True
Else
Sheet2.CheckBoxes("Check Box 23").Value = True
End If
z = Sheets("Settings").Range("XLQ_Functions")
x = GetRefersTo("Fill_Formula")
a = SEARCHFORMULA(z, x)
b = ("xlqh") & Sheets("Settings").Range("Data_Type")
y = Application.Substitute(x, a, b)
ActiveWorkbook.Names("Fill_Formula").RefersTo = y
End Sub
- Ronald K.
Sub Macro_Change_Function()
'
' Macro_Change_Function Macro
'
'
If Sheet2.CheckBoxes("Check Box 23").Value = False Then
Sheet2.CheckBoxes("Check Box 23").Value = True
Else
Sheet2.CheckBoxes("Check Box 23").Value = True
End If
z = Sheets("Settings").Range("XLQ_Functions")
x = GetRefersTo("Fill_Formula")
a = SEARCHFORMULA(z, x)
b = ("xlqh") & Sheets("Settings").Range("Data_Type")
y = Application.Substitute(x, a, b)
ActiveWorkbook.Names("Fill_Formula").RefersTo = y
End Sub
- Ronald K.