Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

adding shapes to forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gbpg - 26 Nov 2007 04:11 GMT
I know you can add an arrow shape to a sheet with using Active Sheet. Is
there a way to have an arrow appear on the form?
Jim Cone - 26 Nov 2007 04:44 GMT
Add a label to the form
Use "Copy Picture" on the Edit menu and copy a picture of the shape.
Select the label on the form
In the VBE properties window , paste the picture into the
picture property of the label.
Signature

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)

"gbpg"
wrote in message
I know you can add an arrow shape to a sheet with using Active Sheet. Is
there a way to have an arrow appear on the form?

gbpg - 26 Nov 2007 05:56 GMT
Hi Jim:
Do you mean there is no way to do what you can do with a sheet (ie):
Set Shp= ActiveSheet.Shapes.AddShape

> Add a label to the form
> Use "Copy Picture" on the Edit menu and copy a picture of the shape.
> Select the label on the form
> In the VBE properties window , paste the picture into the
> picture property of the label.
Jim Cone - 26 Nov 2007 06:37 GMT
You cannot add shapes to a userform.
You would have to find a control that looked like an arrow in order
to add an arrow directly on a userform.  I don't know of any.

A label or other controls can be added directly to a userform.
This example uses code in the userform module run by clicking a command button...
'---
Private Sub CommandButton1_Click()
Dim cmdLabel As Control
Set cmdLabel = Me.Controls.Add("Forms.Label.1")
cmdLabel.Left = 18
cmdLabel.Top = 100
cmdLabel.Width = 175
cmdLabel.Height = 20
cmdLabel.BackColor = &HFF8080
End Sub
---
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)

"gbpg"
wrote in message
Hi Jim:
Do you mean there is no way to do what you can do with a sheet (ie):
Set Shp= ActiveSheet.Shapes.AddShape

"Jim Cone" wrote:

> Add a label to the form
> Use "Copy Picture" on the Edit menu and copy a picture of the shape.
> Select the label on the form
> In the VBE properties window , paste the picture into the
> picture property of the label.
Andy Pope - 26 Nov 2007 12:18 GMT
Hi,

As Jim says there is no built in shape controls.
Using a label or image control to hold a picture of a shape is the best you
can do.

I have written some code to using this approach.
http://www.andypope.info/vba/userformdraw.htm

Cheers
Andy
Signature


Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

> Hi Jim:
> Do you mean there is no way to do what you can do with a sheet (ie):
[quoted text clipped - 5 lines]
>> In the VBE properties window , paste the picture into the
>> picture property of the label.
gbpg - 27 Nov 2007 04:26 GMT
Hey Andy:
Thanks I almost gave up there - got my lines figured out and text. How can
you change the orientation of the arrow to point down?

> Hi,
>
[quoted text clipped - 16 lines]
> >> In the VBE properties window , paste the picture into the
> >> picture property of the label.
Andy Pope - 27 Nov 2007 09:34 GMT
Hi,

Either use the Down Arrow autoshape or rotate it.

Cheers
Andy

Signature

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

> Hey Andy:
> Thanks I almost gave up there - got my lines figured out and text. How can
[quoted text clipped - 21 lines]
>> >> In the VBE properties window , paste the picture into the
>> >> picture property of the label.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.