Drawing shapes on Userform

  • Thread starter Thread starter mangesh_yadav
  • Start date Start date
You could create graphic files of coloured circles, and insert them into
the UserForm as images. Show or hide them as required.
 
Yes, but that would require me to carry the image files everywhere alon
with the excel application.

Manges
 
Hi mangesh_yadav,
If you can be satisfied with the default color:
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function GetWindowDC Lib "user32" _
(ByVal hWnd As Long) As Long
Private Declare Function Ellipse Lib "gdi32" (ByVal hDC As Long _
, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long _
, ByVal Y2 As Long) As Long

Private Sub UserForm_Activate()
DoEvents
Ellipse GetWindowDC(GetActiveWindow), 10, 40, 90, 120
End Sub

Regards,
MP
 
I read Debra's suggestion as designing the userform with all the shapes/images
included. Then use code to hide/show the ones you want.
 
Yes, but that would require me to carry the image files everywhere along
with the excel application.

Mangesh

Mangesh, it wouldn't require this at all if you do this at design time.
 
Hi Michel,

Thanks for the response. I will try it out and come back in case of an
difficulties. I hope it doesn't require any addins or new settings.

- Manges
 

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

Back
Top