worksheet(1).VPageBreaks(1).Location = worksheet.Range("G1"<br><br>how do i change to VFP format, it say unkown name when I run it.<br><br>I want to move the Vertical Pagebreak to a <br>Colmun 'G'.<br><br>
Kitnba, I don't see a reference to the Excel object in your statement:<br><br>worksheet(1).VPageBreaks(1).Location = worksheet.Range("G1"<br><br>Normally, you'd use CreateObject() to instantiate Excel, then use that reference from then on. For example:<br><br><FONT FACE=monospace>oExcel = CreateObject("Excel.Sheet"<br>...<br>oExcel.Worksheets(1).VPageBreaks(1).Location = Worksheets(1).Range("e5"<br></font><br><br>You'll need to use the oExcel reference as I've shown above. Also, note that my example differs from yours slightly - mine is right out of the Excel VB Reference, and specifically references Worksheets(1) before the Range property. I really don't know much about Excel automation, but maybe that is one the issues you are experiencing.<br><br> <p>Robert Bradley<br><a href=mailto: > </a><br><a href=
Ooops! I just broke the rule I was trying to emphasize.<br><br>Change the line I wrote:<br><br><FONT FACE=monospace>oExcel.Worksheets(1).VPageBreaks(1).Location = Worksheets(1).Range("e5"</font><br><br>to:<br><br><FONT FACE=monospace>oExcel.Worksheets(1).VPageBreaks(1).Location = <font color=red>oExcel.</font>Worksheets(1).Range("e5"</font> <p>Robert Bradley<br><a href=mailto: > </a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.