Hi all!
I am new to this forum, and this is my first post, so cut me some slack, because I'm a little nervous, albeit very excited!
I have a simple problem in Excel regarding the special paste command. Specifically, if I try to do a special paste for a selection as a "picture" (although the same problem occurs if I special paste my selection as a "PDF"). Oddly, if I perform these steps manually, I have no problem, and it works fine. But if I attempt to use the VBA code that was generated in the macro-record, the vba compiler hangs up on the special paste command when I add it to my vba code!
Here is the simple process I do manually that works fine.
I "Select All", (within the active worksheet that I am on), then I "Copy", and finally I select a special paste command using the "Picture" option. It does exactly what I want it to do. All of my individual graphs, plots, spread sheets, etc, from that sheet, are now saved as one solid picture.
But if I attempt to implement the same command in VBA, then my program crashes on the "Special Paste" command.
The code looks like this:
Sub PasteTest()
ActiveSheet.Shapes.SelectAll
Selection.Copy
ThemeEffectScheme.PasteSpecial Format:="Picture", Link:=False, _
DisplayAsIcon:=False
End Sub
For some reason, the vba compiler crashes on the following line, even though this same command works fine when done manually!
ThemeEffectScheme.PasteSpecial Format:="Picture", Link:=False, _
DisplayAsIcon:=False
Can somebody please, please, please, help me! It's been driving me nuts!
I just retired from Boeing. I'm an engineer, and I am working on an automated spreadsheet that will help people on the ketosis diet.
I really hope somebody can help me, because I can usually figure this stuff out using trial and error, but not tonight! Tonight, the clowns that live within my head (and sleep under my bed!), are all mocking me, and laughing out loud... with their big fat clown feet!
Regards, Tony
Bookmarks