Run-Time Error '9'; Subscript out of range

Roland Hoelscher

New Member
Joined
Oct 15, 2022
Messages
11
Office Version
  1. 365
Platform
  1. Windows
In my VBA project the "HOME" sheet has a command button where the click event has a single line of code (for now).
The single line of code is to show form "frmSelectFolder". The VBA project clearly includes a form by that name. But when I click on the command button I get "Run-time error '9' Subscript out of range.
See attached screen shots. The code used to work in the past; at some point it started to throw this error-9. Any suggestions where I should look for the source of this problem?
Thank you in advance!
Roland
 

Attachments

  • error-9 screen shot JPG.png
    error-9 screen shot JPG.png
    221.9 KB · Views: 21

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
There is probably code in the form's initialize SUB that is broken. Right click on the form name and choose view code. Please copy that code and paste into the editor rather than posting a picture.
 
Upvote 0
Solution
Hi Jeffrey, that seems to have been the problem. You gave me all the help I needed. Thank you very much!!
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,592
Members
452,653
Latest member
craigje92

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top