Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help with Drawing Lines Using VB6.0

Hello all,



I have a created a program using VB6.0 that makes an Excel spreadsheet.
Within the spreadsheet, the VB6 program draws lines using coordinates (eg.
Sheet.Shapes.AddLine(122.25, 471#, 132.75, 471#).Line.Weight = 1.5)



For most of the users, this works fine, however I have a few users that have
the lines slightly shifted to the left and down from where they should be.



All users have the same version of VB6 program and same version (with
Service Pack) of Excel. Is there some sort of setting in Excel that the user
can change the coordinate system?



Thanks for any help,

James Walker, Jr.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Help with Drawing Lines Using VB6.0

The zoom setting is probably not set to 100%.

this gives me a slightly different location when using your code.

Perhaps you want to anchor to a cell

Sub DrawLine()
With Worksheets("Sheet1").Range("C37")
ActiveSheet.Shapes.AddLine(BeginX:=.Left + 0.5 * .Width, _
BeginY:=.Top + 0.5 * .Height, _
EndX:=.Left + 0.5 * .Width + 12, _
EndY:=.Top + 0.5 * .Height).Line.Weight = 1.5
End With
End Sub

--
Regards,
Tom Ogilvy


"James Walker" wrote:

Hello all,



I have a created a program using VB6.0 that makes an Excel spreadsheet.
Within the spreadsheet, the VB6 program draws lines using coordinates (eg.
Sheet.Shapes.AddLine(122.25, 471#, 132.75, 471#).Line.Weight = 1.5)



For most of the users, this works fine, however I have a few users that have
the lines slightly shifted to the left and down from where they should be.



All users have the same version of VB6 program and same version (with
Service Pack) of Excel. Is there some sort of setting in Excel that the user
can change the coordinate system?



Thanks for any help,

James Walker, Jr.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drawing Horizontal Lines - Hi-Lo Range jaygreg Charts and Charting in Excel 1 November 8th 06 03:44 PM
Problem in Drawing Lines (AutoShapes) Jac Excel Discussion (Misc queries) 0 October 8th 06 08:45 AM
Drawing lines to cells with VBA Jean-Jerome Doucet via OfficeKB.com Excel Programming 2 June 30th 05 07:05 PM
Drawing lines to cells with VBA Werner[_17_] Excel Programming 1 June 30th 05 07:01 PM
Problem drawing lines on charts Susan Lambert Charts and Charting in Excel 7 December 13th 04 08:29 AM


All times are GMT +1. The time now is 11:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"