VBA Code to Select Pen/Draw or inkpicture

Jason Barnes

New Member
Joined
Jan 15, 2015
Messages
46
Have been playing with signature boxes, etc.
Would like to use the inkpicture feature but don't like the active x turned on. If you feel this is the better option and I can turn the active x message off with code when workbook opens, then feel free to share.

I'd at least like VBA code to select the Draw tab and pen tool when code is run.
Currently using Worksheet_SelectionChange on a specific range to zoom to a signature box to draw in. Code would go here.
Would immediately be able to draw signature without having to go to Draw tab and select pen tool.

Thanks,
Jason
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I'm only short of a decade late but... Here was today's solution: 😅

VBA Code:
Application.SendKeys "%"                                'ALT menu'
Application.SendKeys "j"                                '1/2 for drawing menu'
Application.SendKeys "i"                                '2/2 for drawing menu'
Application.SendKeys "g"                                'Drawing tools'
Application.SendKeys "{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}~"  'Ensure select tool is selected (to ensure the pen is always chosen)'
Application.SendKeys "{RIGHT}{RIGHT}{RIGHT}~"           'Go to the pen tool and select it'

I tried to combine these lines but I found them to be more accurate separately laid out.

Cheers!
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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