Hi guys,
I'm having trouble with a macro used in 2003 but refuses to run in 2007. It's an old program, and to be honest I'm not real great with VBA. I've searched and searched for hours and simply cannot find any information on how to fix my problem. I was hoping you guys could shed some light on the matter...
Here's the code I'm working with:
If NumCharts% <= 1 Then
With .TextBoxes.Add(0, 0, 0, 0)
.AutoSize = True
.Formula = "=" + TheSource$ + RowCol$(21, ColSource%)
.Formula = "=" + TheSource$ + RowCol$(21, ColSource%)
End With
With .TextBoxes.Add(0, 15, 0, 0)
.AutoSize = True
.Formula = "=" + TheSource$ + RowCol$(22, ColSource%)
End With
With .TextBoxes.Add(0, H& - 25, 0, 0)
.AutoSize = True
.Formula = "=" + TheSource$ + RowCol$(20, ColSource%)
End With
End If
I didn't write this code, it was handed down to me. The issue arises when the ".Formula" line is ran. I am given an error message "Run-time error '1004': Unable to set the Formula property of the TextBox class"
Do you guys see any issues with the above code? Again, this works in 2003 but not 2007. ANY help at all would be GREATLY GREATLY appreciated. I've spent countless hours trying to fix this issue to no avail.
Thanks in advance.
I'm having trouble with a macro used in 2003 but refuses to run in 2007. It's an old program, and to be honest I'm not real great with VBA. I've searched and searched for hours and simply cannot find any information on how to fix my problem. I was hoping you guys could shed some light on the matter...
Here's the code I'm working with:
If NumCharts% <= 1 Then
With .TextBoxes.Add(0, 0, 0, 0)
.AutoSize = True
.Formula = "=" + TheSource$ + RowCol$(21, ColSource%)
.Formula = "=" + TheSource$ + RowCol$(21, ColSource%)
End With
With .TextBoxes.Add(0, 15, 0, 0)
.AutoSize = True
.Formula = "=" + TheSource$ + RowCol$(22, ColSource%)
End With
With .TextBoxes.Add(0, H& - 25, 0, 0)
.AutoSize = True
.Formula = "=" + TheSource$ + RowCol$(20, ColSource%)
End With
End If
I didn't write this code, it was handed down to me. The issue arises when the ".Formula" line is ran. I am given an error message "Run-time error '1004': Unable to set the Formula property of the TextBox class"
Do you guys see any issues with the above code? Again, this works in 2003 but not 2007. ANY help at all would be GREATLY GREATLY appreciated. I've spent countless hours trying to fix this issue to no avail.
Thanks in advance.