![]() |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 01:56 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com