Paint controls in the vba toolbox?

R

R. Langdon

Hey,


I want to have some lines, boxes and circles on my excel vba userform.
In the excel vba toolbox there are no paint controls.
Where can I find these controls and how can I add them to my toolbox?

Thanks,

R. Langdon
 
C

Chip Pearson

You can use FindWindow to get the HWnd of a userform.

Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As
Long

Sub AAA()
Dim UserformHWnd As Long
UserformHWnd = FindWindow("ThunderDFrame", UserForm1.Caption)
If UserformHWnd <> 0 Then
' work with UserformHWnd
End If
End Sub

If you're working in Excel97, use "ThunderXFrame" instead of
"ThunderDFrame".


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top