Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 2nd, 2004, 12:46 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default How can I draw lines on User Forms?

MS Access allows drawing lines on forms, and so does VB.

How is this done in the case of standard VBA?

I could use 1-pixel wide labels, but I want to draw at angles other than 90º or 0º.
 
Old December 2nd, 2004, 03:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try have a look at this page.

http://www.andypope.info/vba/userformdraw.htm

You can download the example and examine the code.
 
Old December 2nd, 2004, 05:56 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Hey Birger.

That citation was interesting. I downloaded that sample, and another as well!

I thought it might be problematic to post under Excel, but it was the only VBA forum I could see that seemed general enough to field the question...

I am trying to do this in AutoCAD. AutoCAD has VBA, but does not have the Shapes functionality alongside it that Excel (and apparently Word, as well) has.

The page you cited mentioned the API route; do you know of any resources that give examples of using APIs?
I have Dan Appleman's outstanding API book, but there are so many API functions!
If someone has already worked this out, I’d rather lean on their work...
 
Old December 3rd, 2004, 07:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Brian!

Agree that one shouldn't reinvent the wheel. I also find the API rather complex and I havn't had need to use much of it.

I would expect you should stand a better chance in pure VB/C++ communities to find explanations of/links to the API.

I'm not sure that I have any specific links but I'll have a look when I get home from work and post what I may find. I think I have some German, but the code is of cause universal.
 
Old December 4th, 2004, 06:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Don't think there's much of interest, but here's the link I mentioned:

http://www.aboutvb.de/
http://www.vba-programmer.com/





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to draw lines of fix measurements? Abhi.Win BOOK: Professional C#, 2nd and 3rd Editions 0 December 23rd, 2005 01:12 PM
How to draw fix measurement lines Abhi.Win C# 0 December 23rd, 2005 12:43 PM
User Forms flupsie Beginning VB 6 1 December 23rd, 2005 05:35 AM
Let user make forms and controls smang VB.NET 2002/2003 Basics 0 September 2nd, 2005 04:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.