Hello All!
This is my first thread. Forgive me if I violate the forum rules.
I'm working with a VBA macro that was written by an intern who is now gone. The VBA code uses If-Then-ElseIf statements to hide and show pictures on a worksheet. The following is the piece of the code that I am interested in:
All the objects in "quotes" are names of pictures on the worksheet. I've taken these pictures, put them in Microsoft Word, put them into a drawing canvas, and added arrows and text to make them easier to understand by the user (hopefully). I copy/pasted them back into the worksheet to replace the old pictures and made sure all the names were the same. When pasting I kept the source formatting so instead of pictures objects they are now canvas objects in the worksheet. This is ideal because I want to be able to change the text inside the pictures in the future. The problem is when running the VBA macro I now get "Compile error: Method or data member not found." I think this is because the pictures are now canvas objects and Shapes.Range doesn't recognize them.
I have 2 options: 1) Remove all canvas objects and copy/paste them back in the worksheet as pictures or 2) change the VBA code.
I know how to do the first option. Do you guys know how I can do the second option? That is, what can I use to recognize/return canvas objects in the VBA code?
I Thank you in advance: Thank you,
Nick
This is my first thread. Forgive me if I violate the forum rules.
I'm working with a VBA macro that was written by an intern who is now gone. The VBA code uses If-Then-ElseIf statements to hide and show pictures on a worksheet. The following is the piece of the code that I am interested in:
HTML:
Instructions.Shapes.Range(Array("Zero_Dual", "Zero_Single", "RCS", "RCD", "Z0_Dual", "Z0_Single", "RSD", "TCMS", "TCSS", "TCSD", "TCMD", "FSMS", "FSSS", "FSMD", "FSSD" _
,"GSSGM", "GSSGS", "FTMS", "FTSS", "FTGDM", "FTMD", "FTDGS", "FTSD", "BSM", "BSS", "BDGM", "BMD", "BDGS", "BSD")).Visible = False
All the objects in "quotes" are names of pictures on the worksheet. I've taken these pictures, put them in Microsoft Word, put them into a drawing canvas, and added arrows and text to make them easier to understand by the user (hopefully). I copy/pasted them back into the worksheet to replace the old pictures and made sure all the names were the same. When pasting I kept the source formatting so instead of pictures objects they are now canvas objects in the worksheet. This is ideal because I want to be able to change the text inside the pictures in the future. The problem is when running the VBA macro I now get "Compile error: Method or data member not found." I think this is because the pictures are now canvas objects and Shapes.Range doesn't recognize them.
I have 2 options: 1) Remove all canvas objects and copy/paste them back in the worksheet as pictures or 2) change the VBA code.
I know how to do the first option. Do you guys know how I can do the second option? That is, what can I use to recognize/return canvas objects in the VBA code?
I Thank you in advance: Thank you,
Nick