
Originally Posted by
xlnitwit
You can skip the reference and late bind
Dim MyData As Object
Set MyData = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
You should also be aware that the dataobject is a little buggy in versions of Windows from 8 onwards.
Thanks, no idea why but that works a treat!
Sub InsertPicture_Gf4_xlnitwit()
' "You can skip the reference and late bind" - no idea what that means _
' but took a stab at editing accordingly
' WORKS. Maybe I'll find time later to learn WHY!
Dim MyData As Object 'Was "DataObject"
Dim strClip As String
Set MyData = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
MyData.GetFromClipboard
strClip = MyData.GetText
Range("A30").Select
ActiveSheet.Pictures.Insert(strClip).Select
Selection.ShapeRange.ScaleHeight 0.85, msoFalse, msoScaleFromTopLeft
Application.CommandBars("Format Object").Visible = False
Rows("27:27").Select
End Sub
Bookmarks