create textbox per click

lyntan

New Member
Joined
Sep 14, 2015
Messages
19
hello. im new to excel and im working on a project dashboard using excel 2013.
is there a way to create a textbox in a chart when i click a userform button? one textbox per click.
and im unable to use activeXcontrols in my excels. it says " cannot insert object"

please help :confused:
 
:confused:Like this?

Code:
Private Sub CommandButton1_Click()
ActiveSheet.Shapes.AddLabel(msoTextOrientationHorizontal, [B]100[/B], 65, 65, 65).Select
End Sub
I hope you already have a userform and some command-button.

If you will click consecutively, it is better to change the "100".
And I recommend property of the userform is ShowModal / False.
 
Upvote 0
oh it worked! thank you!
i have another question. is there a way to add grand total in pivot chart?
 
Upvote 0

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