I have tried drawing line ,but I want to draw in the specific cells of the Excel sheet.for ex 55th row 5 column.how to draw.please help me
Main Topics
Browse All TopicsI have created a report which should be displayed in Ms-Excel.I have written coding which displays the datas in Ms-Excel sheet.But with that data I have to draw a line in the cells of the Excel sheet.Could any body help me how to draw a line in Excel sheet with sample code.It should not be chart .
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi
Try this
Dim x1 As Long, y1 As Long
Dim x2 As Long, y2 As Long
x1 = ActiveSheet.Range("c2").Le
y1 = ActiveSheet.Range("c2").To
x2 = ActiveSheet.Range("e2").Le
y2 = ActiveSheet.Range("e2").To
Range("c2:e2").Select
ActiveSheet.Shapes.AddLine
Now you can draw lines from anywhere to anywhere
Happy programming
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept Answer by lavinder
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
GaryC123
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: lavinderPosted on 2003-01-18 at 05:17:17ID: 7752751
hi
(x1,y1,x2, y2)
Try this
ActiveSheet.Shapes.AddLine