Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 Tags
Subject: RE: Chart Manipulation on Excel 2007 -solved
Thread ID: 269039 Message ID: 269072 # Views: 26 # Ratings: 0
Version: Visual FoxPro 9 Category: Active X Controls & OLE Automation
Date: Friday, July 16, 2010 10:19:20 AM         
   


> > Hello guys,
> >
> > I decided to create a chart today using Excel 2007 via automation and I have made it with one exception, how to place the legends at the bottom of the chart. VBA Script shows me this:
> >
> >
ActiveChart.SetElement(msoElementLegendBottom)
> > 

> >
> > Problem is, I got stuck trying to find the value of msoElementLegendBottom. It can also not be seen in Excel constants. Anyone has an idea of its value? In the meantime I don't have a choice but to manually test several values which is what I have been doing for almost an hour now, still to no avail.
> >
> > Thank you!
> >
> > - Update -
> >
> > A few minutes after posting, I hit the values, LOL!
> >
> > For legends to appear on Top, Right, Left and Bottom; use 101 to 104. 104 is msoElementLegendBottom.
> >
> >
> >
> >
> > http://www.junblogs.com/
> > http://weblogs.foxite.com/sandstorm36/default.aspx
> > http://www.coderisland.com/forum/viewforum.php?f=10
>
> Hi Jun
> open your object browser from the vfp menu and select the tab COM librairies...click browse button....select application...and point to excel.exe.
>
> you have this situation
>
> drag the item "constants" to .h file (txt file) and you get all your office2007 cosntants.
> in your prg (if any) put this at the top
>
> #include yourfile.h
> 

>
> if its a form choice "form" in the vfp menu and item "file to include" and write your h file.
>
>
> Regards
> Yousfi Benameur


Thank you Yousfi. Cetin has showed me this before and I have all the constants in one text file.

I don't include the whole lot though in my project thinking not all of those will be used by me (personal preference). So what I do, whenever I use automation, is to check on that text file, copy the constants I only need and paste it on the method I use. Then at the end of the method, I immediately #undefine those again.



http://www.junblogs.com/
http://weblogs.foxite.com/sandstorm36/default.aspx
http://www.coderisland.com/forum/viewforum.php?f=10

ENTIRE THREAD

Chart Manipulation on Excel 2007 -solved Posted by Jun Tangunan @ 7/16/2010 8:09:23 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by tushar @ 7/16/2010 9:16:08 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by Jun Tangunan @ 7/16/2010 9:31:37 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by tushar @ 7/16/2010 9:47:40 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by Jun Tangunan @ 7/16/2010 10:14:12 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by Yousfi Benameur @ 7/16/2010 10:06:57 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by Jun Tangunan @ 7/16/2010 10:19:20 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by tushar @ 7/16/2010 10:36:49 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by Jun Tangunan @ 7/16/2010 10:43:04 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by Samir H. @ 7/16/2010 11:27:09 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by Jun Tangunan @ 7/16/2010 11:38:49 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by Yousfi Benameur @ 7/16/2010 10:20:39 AM
RE: Chart Manipulation on Excel 2007 -solved Posted by Jun Tangunan @ 7/16/2010 10:29:05 AM