Share via

Userform throws runtime error 91 when file opened by double-clicking file name but not when opening file using recent histiry from task bar

Anonymous
2024-08-02T21:43:19+00:00

I have a file that was uses a common Userform for list selections. If I open the file by going to the folder where it resides and double-click the file name, the Userform code throws runtime error 91 when it reaches a line of code involving the ListBox on the form. The debugger shows the ListBox as 'Nothing' when I put it in the watch window. However, if I open the exact same file from the task bar Excel recent history, it works as intended.

The errors only occur on a computer running Office 365. If I run the exact same code on a computer running Excel 2013, it runs as intended regardless of how I open the file.

What is going on and how do I get the correct behavior by double-clicking the file name?

Microsoft 365 and Office | Install, redeem, activate | Other | Other

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
    2024-08-03T05:59:40+00:00

    Hi CaptDunsel,

    Welcome to Microsoft Community. I am afraid that development issues are out of scope here. It's recommended to ask at Office - Microsoft Q&A. Thanks for your understanding.

    Best Regards,

    Thomas.L - MSFT | Microsoft Community Support Specialist

    Was this answer helpful?

    0 comments No comments