PDA

View Full Version : Need Assistance on VBA Code



keilah
08-22-2007, 08:20 AM
I have got this error with the following code:
"Compile error"
Invalid or unqualified reference

on


Sub MoveChart1()
Dim dbltop As Double, dblleft As Double
ActiveSheet.[A1].Select
ActiveSheet.Shapes ("Chart 33")
'Centers graph
dbltop = .Top
dblleft = .Left
.Top = (ActiveWindow.Height - .Height) / 2
.Left = (ActiveWindow.Width - .Width) / 2
'Resets Graph
'.Top = dbltop
'.Left = dblleft
End Sub

keilah
08-22-2007, 08:31 AM
Ignore the above fixed it....

mdmackillop
08-22-2007, 10:44 AM
Hi Keilah
When you post code, please format it by selecting it and clicking the VBA button. It makes it more readable.
Don't forget to mark your thread solved, even if you fix it yourself.
Regards
MD