Jump to content

SUBSCRIPT ERROR - (Moved)


VinMe
 Share

Recommended Posts

$aTdslist = _Excel_RangeRead($oWorkbook1, Default, "B1:B" & $LastRow)
$aTDSLOC = _Excel_RangeRead($oWorkbook1, Default, "H1:H" & $LastRow)
MsgBox(0, "TAKSY OUTPUT LAST ROW", $LastRow)
_ArrayTrim($aTDSLOC, 1, 1)
_Excel_RangeWrite($oWorkbook1, $oWorkbook1.ActiveSheet, $aTDSLOC, "H2")


$oWorkbook1.Sheets("DS_List").Activate
$mLastRow = $oWorkbook1.ActiveSheet.UsedRange.Rows.Count
$aMdslist = _Excel_RangeRead($oWorkbook1, Default, "B1:B" & $mLastRow)
MsgBox(0, "MASTER OUTPUT LAST ROW", $mLastRow)
_Excel_RangeReplace($oWorkbook1, Default, "F2:F" & $mLastRow, "N/A", "n/a") ;check the requiremetn
$aMLOC = _Excel_RangeRead($oWorkbook1, Default, "F1:F" & $mLastRow) ;LOC NUMBER NEEDS TO BE REPLACED WITH..

_ArrayDisplay($aTDSLOC)
_ArrayDisplay($aMLOC)
_ArrayDisplay($aMdslist)


;DATA COMPARISION BETWEEN TAKSY LIST WITH LOC FROM SAP TO MASTER LIST WITH LOC.

$oWorkbook1.Sheets("OUTPUT").Activate
For $i = 1 To $LastRow - 1
    For $j = 1 To $mLastRow - 1
        If $aTdslist[$i] == $aMdslist[$j] And $aTDSLOC[$i] <> $aMLOC[$j] Then
            $oExcel.ActiveSheet.Range("H" & $i + 2).Interior.ColorIndex = 3
        EndIf
        If $aTdslist[$i] == $aMdslist[$j] And $aMLOC[$j] == "n/a" And _Excel_RangeRead($oWorkbook1, Default, "I" & ($i + 2)) == "NO KIT" Then
            $oExcel.ActiveSheet.Range("H" & $i + 2).Interior.ColorIndex = 2
            _Excel_RangeWrite($oWorkbook1, $oWorkbook1.ActiveSheet, "*", "H" & ($i + 2))
        EndIf
    Next
Next


MsgBox($MB_SYSTEMMODAL, "Status", "Loc extraction, comparision and consolidation is Done", 2)

DEAR TEAM, I am facing issue w.r.t subscript errors kindly help me in solving...

456.xlsx

Edited by VinMe
Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...