I am having an issue with a tool that does a lot of data parsing and tracking... But I have run into an issue I have never experienced.
Detail.jpg
On a dashboard is a table that lists 10 items with 6 columns of data points. The table is scroll-able using an offset formula.
When the form control button in the Detail column is selected for each row, a user form opens with the task details and a couple of simple buttons. When the form opens, there is a simple VBA code written to populate a text box using an index match with whatever task number is the respective ID # column with the details of that task from a separate table on a different tab.
The issue is that when I select the details button for any row, the first instance of the text box population is always blank...
Select1.JPG
But when the form is closed and the same line is selected again, it populates the correct details...
Select2.JPG
And if I move down to the next item, the first time the form populates it does so with the previous task details, and on the second population it opens with the correct details.
I have checked the index and matching ranges multiple times, tried cell and range specifications for the match criteria, nothing seems to work. I also have code written to clear the text box on the form every time it is closed. Still nothing seems to change.
Below is the VBA being used... There would be 10 subs for the 10 different index match options.
Sub Detail1()
Dim sws As Worksheet
Dim dws As Worksheet
'//Set elements
Set sws = ThisWorkbook.Worksheets("ORDER DATA PARSED")
Set dws = ThisWorkbook.Worksheets("Dashboard")
UserForm1.Show
UserForm1.TextBox1.Value = (Application.WorksheetFunction.Index(sws.Range("ODataP[Detail]"), Application.WorksheetFunction.Match(dws.Range("$C$41").Value, sws.Range("ODataP[INDEX ID]"), 0), 1))
End Sub
Bookmarks