A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Re: "I tried the Variant declaration before I changed it to Integer. Neither worked!"
You need to declare values that are fixed as Constants.
The syntax in a class module is:
Private Const lngVariable As Long = 999
The syntax in a standard module is:
Public Const lngVariable As Long = 999
Unfortunately, VBA will not accept an array as a constant.
Also, class modules are private modules, so anything in them is not available to other modules unless the module name is specified and that only works when the variable is declared as public.
Move your declarations to a standard module...
Public arrCoord1 as Variant
Public arrCoord2 as Variant
Then in your UserForm Initialize event or in a Sub that is called when the workbook opens, you can initialize the arrays...
Private Sub UserForm_Initialize()
arrCoord1 = Array(500, 600, 50, 100)
arrCoord2 = Array(600, 700, 60, 110)
End Sub
'---
Jim Cone
Portland, Oregon USA
https://goo.gl/IUQUN2 (Dropbox)
(free & commercial excel add-ins & workbooks)