Is it possible to assign InkPicture background image from the clipboard?

HollowMan19xx

New Member
Joined
Sep 27, 2013
Messages
13
I have a signature form on a tablet that takes the input strokes and then displays them as a picture object (as opposed to an ActiveX shape, which I try to avoid because they can drastically slow down the underlying code). A second technician can add his signature by opening the form, which then brings up the existing signature as the InkPicture background. The two are then combined, ad infinitum.

Here's the problem... there doesn't seem to be a way in VBA (as far as I know, but I'm no expert!) to save the existing picture as a file that can then be assigned as the InkPicture background. So the workaround is to select the picture, copy, insert a chart, paste into the chart, export the chart as a .gif, THEN assign it as the InkPicture background.

Yuck!

My existing code is below, but I get an "Invalid Property Value" error.

The elegant solution would be to assign the InkPicture background from a picture copied to the clipboard.

Does anyone know if this can be done?

Code:
Selection.CopyPicture Appearance:=xlPrinter, Format:=xlPicture
    
Set cht = ActiveSheet.ChartObjects.Add(0, 0, rng.Width - 1, rng.Height - 1)


cht.Chart.Paste
cht.Chart.Export tempdir & "\" & "Sig_Old.gif"
cht.Delete


'Load existing old signature into background of InkPicture...
SignatureForm.InkPicture1.Picture = LoadPicture(tempdir & "\" & "Sig_Old.gif")
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,213,563
Messages
6,114,329
Members
448,564
Latest member
ED38

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