The truth is that it should make no difference if the block original block is uniformly scaled. The only thing I can imagine is that you might not want to match the negative scaling of a block because it will cause a mirrored block to "unmirror"
This routine can be characterized by the following pseudocode
Select single block reference object
extract x y and z scales
convert scales to absolute values
Select blocks to apply scale to...
apply absolute value scale to blocks to be matched, taking care to make the scale positive and/or negative where required.
Given that information, we can do the following...
See if you can find where the program does what is specified in the pseudo code above.
Sub MatchBlockScale()
Dim XScale As Double
Dim YScale As Double
Dim ZScale As Double
Dim OXScale As Double
Dim OYScale As Double
Dim OZScale As Double
Dim ACBlockRef As AcadBlockReference
Dim SSet As AcadSelectionSet
Dim Code(0) As Integer
Dim Data(0) As Variant
Dim GCode As Variant
Dim GData As Variant
Dim X As Integer
Code(0) = 0
Data(0) = "INSERT"
GCode = Code
GData = Data
Set SSet = ThisDrawing.SelectionSets.Add("MatchScale")
While SSet.Count <> 1
SSet.SelectAtPoint ThisDrawing.Utility.GetPoint(, "Select block reference"), GCode, GData
Wend
Set ACBlockRef = SSet.Item(0)
XScale = Abs(ACBlockRef.XScaleFactor)
YScale = Abs(ACBlockRef.YScaleFactor)
ZScale = Abs(ACBlockRef.ZScaleFactor)
SSet.Clear
SSet.SelectOnScreen GCode, GData
For X = 0 To SSet.Count - 1
Set ACBlockRef = SSet.Item(X)
OXScale = ACBlockRef.XScaleFactor
OYScale = ACBlockRef.YScaleFactor
OZScale = ACBlockRef.ZScaleFactor
If OXScale > 0 Then
ACBlockRef.XScaleFactor = XScale
Else
ACBlockRef.XScaleFactor = 0 - XScale
End If
If OYScale > 0 Then
ACBlockRef.YScaleFactor = YScale
Else
ACBlockRef.YScaleFactor = 0 - YScale
End If
If OZScale > 0 Then
ACBlockRef.ZScaleFactor = ZScale
Else
ACBlockRef.ZScaleFactor = 0 - ZScale
End If
Next X
SSet.Delete
End Sub