Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2007

Tip: Looking for answers? Try searching our database.

macro language

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
driller - 13 Feb 2007 20:43 GMT
hello,

pls. help me to integrate this macro
i am trying to make a macro that will resize the Y-axis scale of a line
chart based on formulated cell values...
i got this error message

"Compile Error Sub or Function not defined"
highlighting the ; "     .MinimumScale = Value("N1")"----
below is the basic macro taken from VB.
------
Sub tstmacro()
   ActiveSheet.ChartObjects("Chart 1").Activate
   ActiveChart.ChartArea.Select
   ActiveChart.Axes(xlValue).Select
   With ActiveChart.Axes(xlValue)
       .MinimumScale = Value("N1")
       .MaximumScale = Value("o1")
       .MinorUnit = Value("r1")
       .MajorUnit = Value("q1")
       .Crosses = xlCustom
       .CrossesAt = Value("N1")
       .ReversePlotOrder = False
       .ScaleType = xlLinear
       .DisplayUnit = xlNone
   End With
End Sub
-- ---------
thanks for any assistance
regards

*****
birds of the same feather flock together..
JE McGimpsey - 13 Feb 2007 20:54 GMT
Try changing

   Value("N1")

to

   Range("N1").Value

> hello,
>
[quoted text clipped - 23 lines]
>     End With
> End Sub
driller - 13 Feb 2007 21:06 GMT
thanks Sir,

thats quick and you're dependable...

regards
Signature

*****
birds of the same feather flock together..

> Try changing
>
[quoted text clipped - 31 lines]
> >     End With
> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.