How to execute tollbarfunction in Drawing control by code in VB6
From: Jon-Olav Hermansen (jonoh_Takeaway__at_gmx.net)
Date: 03/10/04
- Next message: Chris Roth: "Re: How to execute tollbarfunction in Drawing control by code in VB6"
- Previous message: Kimmo Laine: "Visio 2003 and full screen view"
- Next in thread: Chris Roth: "Re: How to execute tollbarfunction in Drawing control by code in VB6"
- Reply: Chris Roth: "Re: How to execute tollbarfunction in Drawing control by code in VB6"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 10 Mar 2004 09:04:34 +0100
Hello,
I am trying to execute the "connector tool" toolbar button from code in VB6.
I am using the OleLib.tlb and OleLib2.tlb
I have used the C# code in this post as a reference:
http://groups.google.com/groups?selm=Oagzv1mrDHA.2416%40TK2MSFTNGP10.phx.gbl&oe=UTF-8&output=gplain
My code is as follows:
Public Sub DoClick()
Dim ret As Variant
Dim t As Variant
Dim tmpGUID As olelib.UUID
Dim tmpTarget As IOleCommandTarget
tmpGUID.Data1 = &H21A20
tmpGUID.Data2 = &H0
tmpGUID.Data3 = &H0
tmpGUID.Data4(0) = &HC0
tmpGUID.Data4(1) = &H0
tmpGUID.Data4(2) = &H0
tmpGUID.Data4(3) = &H0
tmpGUID.Data4(4) = &H0
tmpGUID.Data4(5) = &H0
tmpGUID.Data4(6) = &H0
tmpGUID.Data4(7) = &H46
Set tmpTarget = dcobj.object
tmpTarget.Exec tmpGUID, visCmdDRConnectorTool
End Sub
When I execute this sub, I get a "Invalid procedure call or argument" error
message.
Does anyone have an idea of what I am doing wrong?
Is this possible from VB6?
Jon-Olav
- Next message: Chris Roth: "Re: How to execute tollbarfunction in Drawing control by code in VB6"
- Previous message: Kimmo Laine: "Visio 2003 and full screen view"
- Next in thread: Chris Roth: "Re: How to execute tollbarfunction in Drawing control by code in VB6"
- Reply: Chris Roth: "Re: How to execute tollbarfunction in Drawing control by code in VB6"
- Messages sorted by: [ date ] [ thread ]