Hi
I have inherited an Excel spreadsheet with VBA code and I am trying to understand one particular part as I need to replicate what its diong on another spreadsheet.
Description
The spreadsheet is made up of 4 tabs, tab is data entry form, tab 2 and 3 are data reference points using various named ranges, tab is a summary page where data is exported from tab 1 to tab 4.
The sheet contains a form, where on a section of tab 1, there are a number of questions with a drop down box, if you select a certain entry in the drop down box the form pops up for further details.
some of the info on the form is populated with the question information and there is a box with a check number, this is pulled in from the question you are doing, each question has its own check number. next to this is a label, which is the description of the check you are diong.
The code that populates this particular box and label is as follows.
There is various other sections of code on the form and i get what most of it is doing.
I kind of understand the concept of how this is working, Me.IMRef looks like it is referencing a named range made up of 2 columns, one being the check number and the other being the description.
What I cant seem to find is the named range this is referencing or where it is looking for column 1 and column 2.
The only other references to IMRef in the code are where it clears the form when you click the clear button and the section where it is getting the IMRef number from a specific column where the question is asked.
Any pointers for me here that can help me find the source of column1 and column2?
I have inherited an Excel spreadsheet with VBA code and I am trying to understand one particular part as I need to replicate what its diong on another spreadsheet.
Description
The spreadsheet is made up of 4 tabs, tab is data entry form, tab 2 and 3 are data reference points using various named ranges, tab is a summary page where data is exported from tab 1 to tab 4.
The sheet contains a form, where on a section of tab 1, there are a number of questions with a drop down box, if you select a certain entry in the drop down box the form pops up for further details.
some of the info on the form is populated with the question information and there is a box with a check number, this is pulled in from the question you are doing, each question has its own check number. next to this is a label, which is the description of the check you are diong.
The code that populates this particular box and label is as follows.
VBA Code:
Private Sub IMRef_Change()
If Me.IMRef.Value <> "" Then
IMlabel.Caption = Me.IMRef.Column(1)
CheckNo.Value = Me.IMRef.Column(2)
End If
End Sub
There is various other sections of code on the form and i get what most of it is doing.
I kind of understand the concept of how this is working, Me.IMRef looks like it is referencing a named range made up of 2 columns, one being the check number and the other being the description.
What I cant seem to find is the named range this is referencing or where it is looking for column 1 and column 2.
The only other references to IMRef in the code are where it clears the form when you click the clear button and the section where it is getting the IMRef number from a specific column where the question is asked.
Any pointers for me here that can help me find the source of column1 and column2?