larrykathy
Technical User
Using VB, I select a photo and drag-drop it over a button. That opens another form that has an ole on it. The excel sheet opens on that form through the ole and displays nicely. Then the photo is pasted into the ole-excel sheet perfectly. All I'm trying to do now is resize the photo through code after pasting it.
'''from photo select form
Clipboard.Clear
Clipboard.SetData Image1.Picture
'''now the other form
frmCreateConcern.Show
frmCreateConcern.OLE1.DoVerb
frmCreateConcern.OLE1.object.Application.WindowState = xlMaximized
frmCreateConcern.OLE1.object.ActiveSheet.Paste
I'd like to use something like this....
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 144#
Selection.ShapeRange.Width = 192#
but it says that object is not selected or set. Now on the Excel sheet it is selected. I guess my question is.. How do I refer to that object?
ole1.object.selection.ShapeRange.LockAspectRatio = msoTrue............for example
Thanks
Larry
'''from photo select form
Clipboard.Clear
Clipboard.SetData Image1.Picture
'''now the other form
frmCreateConcern.Show
frmCreateConcern.OLE1.DoVerb
frmCreateConcern.OLE1.object.Application.WindowState = xlMaximized
frmCreateConcern.OLE1.object.ActiveSheet.Paste
I'd like to use something like this....
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 144#
Selection.ShapeRange.Width = 192#
but it says that object is not selected or set. Now on the Excel sheet it is selected. I guess my question is.. How do I refer to that object?
ole1.object.selection.ShapeRange.LockAspectRatio = msoTrue............for example
Thanks
Larry