ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Autoshapes on Excel user forms (https://www.excelbanter.com/excel-programming/411203-autoshapes-excel-user-forms.html)

[email protected]

Autoshapes on Excel user forms
 
Hi everyone,

Is it possible to draw autoshapes on excel user forms with code on
form load?

Regards
Stefano

Rick Rothstein \(MVP - VB\)[_1972_]

Autoshapes on Excel user forms
 
Is it possible to draw autoshapes on excel user forms with
code on form load?


Yes, look up the AddShape method of the Shapes Collection. Here is an
example...

Worksheets("Sheet1").Shapes.AddShape msoShapeCloudCallout, 20, 40, 50, 60

Rick


Norman Jones[_2_]

Autoshapes on Excel user forms
 
Hi Stefano,

=============
Is it possible to draw autoshapes on excel user forms with code on
form load?
=============

There is no in-built way to add a shape to a
Userform

You could, however use a label or an image
control to display a picture of the shape.

See, for example, Andy Pope at:

Drawing on userform
http://www.andypope.info/vba/userformdraw.htm



---
Regards.
Norman

Rick Rothstein \(MVP - VB\)[_1973_]

Autoshapes on Excel user forms
 
Hmm! You said "user forms" (two words) and I thought you meant a worksheet
"form"... Norman read that you meant UserForm (one word)... I'm guessing
Norman is probably right.

Rick


"Rick Rothstein (MVP - VB)" wrote in
message ...
Is it possible to draw autoshapes on excel user forms with
code on form load?


Yes, look up the AddShape method of the Shapes Collection. Here is an
example...

Worksheets("Sheet1").Shapes.AddShape msoShapeCloudCallout, 20, 40, 50, 60

Rick




All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com