• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

getting error Run Time 32809

Hi,

I am using listbox with multiple selection, but It was working fine now It's getting error in -
"Set SelShp = Sheet1.Shapes(Application.Caller)"
I need to select Q1 + Q2 + Q3 + Q4 at a single time.

Please find attached sheet for more information.

Please help..!!
 

Attachments

  • Select multiple option in drop down .xlsb
    19.3 KB · Views: 2
Hi,

I am using listbox with multiple selection, but It was working fine now It's getting error in -
"Set SelShp = Sheet1.Shapes(Application.Caller)"
I need to select Q1 + Q2 + Q3 + Q4 at a single time.

Please find attached sheet for more information.

Please help..!!
Hi,

It will only throw an error when you try to run the code from ALT+F8 or through the VBE...
It will work fine if you press the blue shape in the sheet.

This happens because you are setting SelShp as the shape that calls the subroutine (Application.Caller), if you run from VBE, ALT+F8 or even a shortcut, there is no shape to be used, causing an error.

If you need to avoid clicking the shape, you can use:
Code:
Set SelShp = Sheet1.Shapes("Rectangle 2")

Hope this helps.
 
Last edited:
Back
Top