joebbshop
New Member
- Joined
- Aug 4, 2009
- Messages
- 26
I have developed a dashboard that summarizes data using some shapes. The VBA code positions and re-sizes the shapes based what's found in the raw data. It works fine on my computer, but when another user opens it up, the shapes are all in the wrong place and overlapping. He works in a different city and I've asked him for a screen shot but I don't think he knows what I mean. The code doesn't seem to error out, but the shapes aren't positioned where they're supposed to be.
Is it possible that his screen resolution changes how the VBA code works? If so, what can I do to compensate? If not, what else could be the problem?
Here's a portion of the code...
Is it possible that his screen resolution changes how the VBA code works? If so, what can I do to compensate? If not, what else could be the problem?
Here's a portion of the code...
Code:
Private Sub UpdateBox(curBox As Shape, n)
Dim curValue
If Left(curBox.Name, 3) = "Val" Then
curValue = Format(BoxArray(n, 2), "$###,###,,M")
Else
curValue = BoxArray(n, 2)
End If
On Error GoTo 0
curBox.Select
With Selection
If BoxArray(n, 2) <> 0 Then
.ShapeRange(1).TextFrame2.TextRange.Characters.Text = curValue & BoxArray(n, 3)
Else
.ShapeRange(1).TextFrame2.TextRange.Characters.Text = ""
End If
.ShapeRange.Title = curValue
.ShapeRange.AlternativeText = BoxArray(n, 6)
.Height = BoxArray(n, 4)
.Top = BoxArray(n, 5)
End With
End Sub