<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>makepy.py excel-libs</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Verdana size=2>
<DIV dir=ltr align=left><SPAN class=802465407-20072006><FONT face=Verdana 
size=2>Looking at your VBA code, it seems like Weight is a property of Border, 
not of MajorGridlines.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=802465407-20072006><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=802465407-20072006><FONT face=Verdana 
size=2>You may want to try MajorGridlines.Border.Weight = 
...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=802465407-20072006><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=802465407-20072006><FONT face=Verdana 
size=2>best regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=802465407-20072006><FONT face=Verdana 
size=2>g</FONT></SPAN></DIV><BR></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> python-win32-bounces@python.org 
[mailto:python-win32-bounces@python.org] <B>On Behalf Of </B>Wolf, Matthias 
ALRT/ELD<BR><B>Sent:</B> donderdag 20 juli 2006 9:44<BR><B>To:</B> 
python-win32@python.org<BR><B>Subject:</B> [python-win32] makepy.py 
excel-libs<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/rtf format -->
<P><FONT face=Arial size=2>Hello</FONT> </P>
<P><FONT face=Arial size=2>I've made a 'Microsoft Excel 11.0 Object Library' 
from the 'EXCEL.EXE'-File and can now create excel-diagrams with 
python.</FONT></P>
<P><FONT face=Arial size=2>But if want to use some special variables e.g. 
'MajorGridlines':</FONT> </P><BR>
<P><FONT face=Arial size=2>####### VBA-Marco-Example</FONT> <BR><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp; ActiveChart.Axes(xlValue).MajorGridlines.Select</FONT> 
<BR><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; With Selection.Border</FONT> 
<BR><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
.ColorIndex = 57</FONT> <BR><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Weight = xlHairline&nbsp; 
</FONT><BR><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
.LineStyle = xlDot</FONT> <BR><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; End 
With</FONT> <BR><FONT face=Arial size=2>End Sub</FONT> <BR><FONT face=Arial 
size=2>#######</FONT> </P>
<P><FONT face=Arial size=2>####### Python-Example</FONT> <BR><FONT face=Arial 
size=2>c = excel.ActiveChart</FONT> <BR><FONT face=Arial 
size=2>c.Axes(excelcom.constants.xlValue).MajorGridlines.Weight = 
excelcom.constants.xlHairline</FONT> <BR><FONT face=Arial size=2>#######</FONT> 
</P>
<P><FONT face=Arial size=2>I get the following error:</FONT> <FONT 
face="Courier New" color=#ff0000 size=2>AttributeError: 
'&lt;win32com.gen_py.Microsoft Excel 11.0 Object Library.Gridlines instance at 
0x21599600&gt;' object has no attribute 'Weight'</FONT></P>
<P><FONT face=Arial size=2>Why can I not manipulate this 'MajorGridlines'? Is 
there anything missing in my Library. If yes, which library i have to 
use?</FONT></P><BR>
<P><FONT face=Arial size=2>Thanks in advanced!</FONT> </P>
<P><FONT face=Arial size=2>Kind regards, Wolf</FONT> </P></BODY></HTML>