Message 1 of 6
DYNAMIC Stretch in VBA

Not applicable
09-11-2008
02:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Im so fried.... If anyone knows what im doing wrong.. please slap me on the head and tell me...
Im just trying to modify an existing dynblk from a textbox in vba.
Private Sub CommandButton1_Click()
Dim Clientlogo As String
Clientlogo = TextBox1.Value & "#"
MsgBox Clientlogo
'Changes logo per Users Selections . .
Dim dybprop As Variant, i As Integer
Dim bobj As AcadEntity
For Each bobj In ThisDrawing.ModelSpace
If bobj.ObjectName = "AcDbBlockReference" Then
If bobj.IsDynamicBlock Then
If bobj.EffectiveName = "MONOPOLE" Then
dybprop = bobj.GetDynamicBlockProperties
For i = LBound(dybprop) To UBound(dybprop)
If dybprop(i).PropertyName = "BOTTOM" Then
dybprop(i).Value = Clientlogo
End If
Next i
End If
End If
End If
Next
Me.Hide
End Sub
Im just trying to modify an existing dynblk from a textbox in vba.
Private Sub CommandButton1_Click()
Dim Clientlogo As String
Clientlogo = TextBox1.Value & "#"
MsgBox Clientlogo
'Changes logo per Users Selections . .
Dim dybprop As Variant, i As Integer
Dim bobj As AcadEntity
For Each bobj In ThisDrawing.ModelSpace
If bobj.ObjectName = "AcDbBlockReference" Then
If bobj.IsDynamicBlock Then
If bobj.EffectiveName = "MONOPOLE" Then
dybprop = bobj.GetDynamicBlockProperties
For i = LBound(dybprop) To UBound(dybprop)
If dybprop(i).PropertyName = "BOTTOM" Then
dybprop(i).Value = Clientlogo
End If
Next i
End If
End If
End If
Next
Me.Hide
End Sub