subscript out of range error loading userform

CDICKENS

Active Member
Joined
Mar 24, 2002
Messages
498
Hello All,

I am getting a subscript out of range error when trying to load a form. The code and the form are included in an addin that resides on our network. Here is the code that is calling the form:
Code:
Public Sub RunTrack_Report()
   
    Dim lstRw As Long
    Dim r As Long
    Dim functype As String
    Dim Result As String
    Dim Msg, Style, Title, Help, Ctxt, Response, MyString

    'Msg = "Do you want to run this report?"    ' Define message.
    'Style = vbYesNo + vbCritical + vbDefaultButton2    ' Define buttons.
    'Title = "Tracking Report"    ' Define title.
    'Response = MsgBox(Msg, Style, Title)
    'If Response = vbYes Then    ' User chose Yes.

    Application.ScreenUpdating = False
    Application.DisplayAlerts = False

    CancelFrm = False
    Load Track_Form  ' This is where the error shows up.

I have checked the name of the form and the form is in the addin.

Any suggestions?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Does the form have any code in it's initialize event?

Does it have any controls linked to ranges in workbooks that aren't open when you try to open it?
 
Upvote 0
I think I figured it out. I had hardcoded the addin name into the initialize form event. When the addin version changed it was trying to look at an old version. Now when the addin is opened I assign the name to a variable that i use to refer to the addin from the other modules.

Looks like it worked.

Thanks,
Chuck
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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