Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default shape object on a userform?

I want to create a UserForm1. On the UserFrom I want to create a Trapazoid
shape object and three text boxes. The text boxes would define the trapazoid
height and both lengths. When the user inputs a new number in the text box
the trapazoid shape would change size.

Is this possible?

If I could get the shape drawn on the UserForm I believe I could code the
rest. TIA.

Alan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default shape object on a userform?

It is not trivial to draw on a UserForm. It may be possible to do with some
complicated API programming, but there is no direct way to do it.

--

Vasant


"Alan Ibbotson" wrote in message
...
I want to create a UserForm1. On the UserFrom I want to create a Trapazoid
shape object and three text boxes. The text boxes would define the

trapazoid
height and both lengths. When the user inputs a new number in the text box
the trapazoid shape would change size.

Is this possible?

If I could get the shape drawn on the UserForm I believe I could code the
rest. TIA.

Alan




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default shape object on a userform?

As Vasant says, you can't draw, but you might get away with using a control,
lile a label

Private Sub CommandButton1_Click()
Label1.Width = TextBox1
Label1.Height = TextBox2
End Sub

Private Sub UserForm_Initialize()
TextBox1.Text = Label1.Width
TextBox2.Text = Label1.Height
End Sub




"Alan Ibbotson" wrote:

I want to create a UserForm1. On the UserFrom I want to create a Trapazoid
shape object and three text boxes. The text boxes would define the trapazoid
height and both lengths. When the user inputs a new number in the text box
the trapazoid shape would change size.

Is this possible?

If I could get the shape drawn on the UserForm I believe I could code the
rest. TIA.

Alan



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default shape object on a userform?

Hi Patrick:

If I understood the OP correctly, a trapezoid has angled lines, so I don't
think a Label control would work.

Regards,

Vasant

"Patrick Molloy" wrote in message
...
As Vasant says, you can't draw, but you might get away with using a

control,
lile a label

Private Sub CommandButton1_Click()
Label1.Width = TextBox1
Label1.Height = TextBox2
End Sub

Private Sub UserForm_Initialize()
TextBox1.Text = Label1.Width
TextBox2.Text = Label1.Height
End Sub




"Alan Ibbotson" wrote:

I want to create a UserForm1. On the UserFrom I want to create a

Trapazoid
shape object and three text boxes. The text boxes would define the

trapazoid
height and both lengths. When the user inputs a new number in the text

box
the trapazoid shape would change size.

Is this possible?

If I could get the shape drawn on the UserForm I believe I could code

the
rest. TIA.

Alan





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default shape object on a userform?

Hi,

As the other guys have said it's not straightforward.
But you may find you can make use of the techniques I use in my example.
http://www.andypope.info/vba/userformdraw.htm

Cheers
Andy

Alan Ibbotson wrote:
I want to create a UserForm1. On the UserFrom I want to create a Trapazoid
shape object and three text boxes. The text boxes would define the trapazoid
height and both lengths. When the user inputs a new number in the text box
the trapazoid shape would change size.

Is this possible?

If I could get the shape drawn on the UserForm I believe I could code the
rest. TIA.

Alan



--

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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default shape object on a userform?

That's awesome stuff, Andy!

Regards,

Vasant

"Andy Pope" wrote in message
...
Hi,

As the other guys have said it's not straightforward.
But you may find you can make use of the techniques I use in my example.
http://www.andypope.info/vba/userformdraw.htm

Cheers
Andy

Alan Ibbotson wrote:
I want to create a UserForm1. On the UserFrom I want to create a

Trapazoid
shape object and three text boxes. The text boxes would define the

trapazoid
height and both lengths. When the user inputs a new number in the text

box
the trapazoid shape would change size.

Is this possible?

If I could get the shape drawn on the UserForm I believe I could code

the
rest. TIA.

Alan



--

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro associated with shape object, useful approach if can be solv pshen Excel Programming 1 March 17th 05 02:19 AM
How to tell wich object/shape was clicked Andrew Ofthesong Excel Programming 2 December 1st 03 05:05 PM
XL2000: Shape object events GSQUARED Excel Programming 1 October 22nd 03 05:15 PM
Hyperlink within the TextFrame of Shape Object..? Robert Stober Excel Programming 0 October 12th 03 10:05 PM
How to hide Excel window when activating a Shape object Bob Kilmer Excel Programming 0 September 27th 03 03:51 PM


All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"