I have a vba project that worked great in acad 14 but in acad 2000i it works the first run and teh tells me the named selection set already exists. I have pasted what i believe to be the problem area in the code any ideas?
Private Sub UserForm_Initialize()
Dim BlkG(0) As Integer
Dim TheBlock(0) As Variant
Dim Pt1(0 To 2) As Double
Dim Pt2(0 To 2) As Double
'declare local variables
Set acad = GetObject(, "AutoCAD.Application"
'set reference to AutoCAD
Set doc = acad.ActiveDocument
'set reference to the drawing
Set ms = doc.ModelSpace
'set reference to model space
Set ssnew = doc.SelectionSets.Add("TBLK"
'create a selection set
Pt1(0) = 0: Pt1(1) = 0: Pt1(2) = 0
Pt2(0) = 3: Pt2(1) = 3: Pt2(2) = 0
'set up the array
BlkG(0) = 2
'group code 2 for block name
TheBlock(0) = "E3load1"
'the name of the attribute block
ssnew.Select 5, Pt1, Pt2, BlkG, TheBlock
'get the block
If ssnew.Count >= 1 Then
'if the block is found
Theatts = ssnew.Item(0).GetAttributes
'get the attributes
Private Sub UserForm_Initialize()
Dim BlkG(0) As Integer
Dim TheBlock(0) As Variant
Dim Pt1(0 To 2) As Double
Dim Pt2(0 To 2) As Double
'declare local variables
Set acad = GetObject(, "AutoCAD.Application"
'set reference to AutoCAD
Set doc = acad.ActiveDocument
'set reference to the drawing
Set ms = doc.ModelSpace
'set reference to model space
Set ssnew = doc.SelectionSets.Add("TBLK"
'create a selection set
Pt1(0) = 0: Pt1(1) = 0: Pt1(2) = 0
Pt2(0) = 3: Pt2(1) = 3: Pt2(2) = 0
'set up the array
BlkG(0) = 2
'group code 2 for block name
TheBlock(0) = "E3load1"
'the name of the attribute block
ssnew.Select 5, Pt1, Pt2, BlkG, TheBlock
'get the block
If ssnew.Count >= 1 Then
'if the block is found
Theatts = ssnew.Item(0).GetAttributes
'get the attributes