Share via

Analysis toolpak error 9

Anonymous
2022-10-27T10:36:23+00:00

I started learning VBA recently and when i open a new excel workbook I get this error message.

and when I click on Debug, I get this.

I might just remove Analysis toolpak from Add in, but I need to use. I never encountered any issue with it before until I started writing some VBA code.

Does anyone have the same issue?

How to fix it?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-10-27T11:33:56+00:00

    Hi Yasmin

    I'm Anna and I'd be happy to help you with your question. In this Forum, we are Microsoft consumers just like yourself.

    Sorry for the trouble this might have caused. Subscript Out of Range Error (Run Time: Error 9) occurs when you refer to an object or try to use a variable in a code that doesn’t exist in the code, in that case, VBA will show this error.

    There are a couple of likely reasons for this based on your code:

    Your sheet name variable contains hidden characters that make it different even though it appears correct. You are looking for the sheet in the wrong workbook.

    You can check the naming of sheets in your workbook

    I hope this helps ;-), let me know if this is contrary to what you need, I would still be helpful to answer more of your questions.

    Best Regards,

    Anna

    Give back to the community. Help the next person with this problem by indicating whether this answer solved your problem. Click Yes or No at the bottom.

    Was this answer helpful?

    0 comments No comments