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")
 

Some videos you may like

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Watch MrExcel Video

Forum statistics

Threads
1,108,614
Messages
5,523,906
Members
409,542
Latest member
Shezz01

This Week's Hot Topics

Top