NewOrderFac33
Well-known Member
- Joined
- Sep 26, 2011
- Messages
- 1,283
- Office Version
- 2016
- 2010
- Platform
- Windows
Good afternoon,
The following code, which works on my PC at work (Office 2010/Win 7) won't work on my PC at home (Office 2010/Win XP). The line draws successfully, but if any of the commented out lines are uncommented, they return the error message: "The specified value is out of range".
As I input the code manually, because I can't email code from work, I'm just wondering if anyone can see anything wrong with it. Perhaps I set a reference to something at work that I've forgotten?
The following code, which works on my PC at work (Office 2010/Win 7) won't work on my PC at home (Office 2010/Win XP). The line draws successfully, but if any of the commented out lines are uncommented, they return the error message: "The specified value is out of range".
As I input the code manually, because I can't email code from work, I'm just wondering if anyone can see anything wrong with it. Perhaps I set a reference to something at work that I've forgotten?
Code:
Sub AA_Test()
Set MyDocument = Worksheets("MailMe")
With MyDocument.Shapes.AddLine(100, 100, 200, 300).Line
'.BeginArrowheadLength = msoArrowheadShort
'.BeginArrowheadStyle = msoArrowheadOval
'.BeginArrowheadWidth = msoArrowheadNarrow
'.EndArrowheadLength = msoArrowheadLong
'.EndArrowheadStyle = msoArrowheadTriangle
'.EndArrowheadWidth = msoArrowheadWide
End With
End Sub
[code]
Thanks in advance for your help.
Pete