LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Compile Error in Code

In the following code, I receive a compile error: Sub or
Function not defined. In the fifth line, "ChartObjects" is
highlighted. Can someone help me clear this problem?

Sub GoToMetricsA1()
' GoToMetricsA1 Macro
Sheets("Metrics").Select
Range("A1").Select
ChartObjects("Chart13").activate
With ActiveChart.Parent
.Height = 250 ' use desired height in points
.Width = 350 ' use desired width in points
.Left = (Windows(ActiveWorkbook.Name).Width - _
.Width)/2
.Top = (Windows(ActiveWorkbook.Name).Height - _
.Height)/2
End With
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile VBA code? (Passwording too weak a protection scheme?) [email protected] Excel Discussion (Misc queries) 1 August 20th 06 04:57 PM
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 01:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"