Shapes on Userforms - A .borderthickness work around

tbrock

New Member
Joined
Feb 17, 2016
Messages
36
Hello again,

I have what I thought would be a simple task: placing a *real* shape onto a user form.

I know this topic has been discussed before and even many year ago. Scouring the net, I have seen two possible methods via:
  • Autoshapes: (thank you, Andy Pope) But (if I have not misunderstood) this does not draw the shape onto the userform. Rather it creates the shape off form and then copies an image of that shape onto the form. This would, then have the disadvantage of having properties (backcolor, forecolor, text, etc) that are not modifiable without recreating a new image at every change (and for every property).
  • API: (thank you, Jaafar Tribak). This does create "shapes" directly upon the userform, but is it limited to very basic shapes and (I believe?) without all the properties that the shape object would have.
That leaves me thinking the "amazing", that something that seems so obvious (to me, at least) - drawing shapes on a userform - is not truly possible? I'd have thought this functionality would have been an obvious checklist item in the creation of userforms. (sigh) If I am wrong and it is possible to draw a shape onto a userform, please help me acheive an epiphany! :)

In trying to work around this seeming limitation in my current application, I could get away with a standard form object (label, textbox,frame,etc) IF border thickness/width/weight were settable. But I have not found a single (userform) object to this point that has this property. So this is my question:

Is there a userform placeable object (that could emulate a shape) which has a settable border width/thickness/weight?
 
I like how your example looks with just a blank white background. At that point, cell location would be unimportant.

VBA Code:
Sub DisplayAll(show As Boolean)
    Application.DisplayFormulaBar = show
    ActiveWindow.DisplayHeadings = show
    ActiveWindow.DisplayGridlines = show
End Sub

Clean look
VBA Code:
    Call DisplayAll(False)
Reinstate
VBA Code:
    Call DisplayAll(True)
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,214,925
Messages
6,122,301
Members
449,078
Latest member
nonnakkong

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top