Excel Shape.AddLine bug?

creutz

New member
Joined
Mar 11, 2008
Messages
1
Programming Experience
Beginner
hello

I am developing a (sharpdevelop) vb.net 2 procedure library for an Excel workbook.
One procedure in the library, used with a excel macro button, is to add a line on a specific location.

The interesting lines of vb.net code looks like this

VB.NET:
Friend WithEvents WB As Excel.Workbook
Procedure AddMyLine()
  WB.ActiveSheet.Shapes.AddLine(10, 10, 99, 99).Select
End Procedure

My problem is that this AddLine code produces different lines before and after a print command.
My line is around 2.5 inches if issued before a Print command,
but 16 inches if issued after a Print command.

Am I doing anything stupid or is VB.NET (Sharpdevelop) bugging?

tia Anders
 

Latest posts

Back
Top