Message 1 of 2
VBA Macro translate

Not applicable
07-09-2019
01:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would want to translate this code from Ilogic to VBA macro. Is there a kind soul who would help me with this code??
Sub Main() oDoc = ThisApplication.ActiveDocument Dim oSelectSet As SelectSet oSelectSet = oDoc.SelectSet oSelectSet.Clear osketch=ThisApplication.ActiveEditObject If osketch.type=83924736 Then If osketch.sketchblocks.count=0 Then Exit Sub End If oSelectSet.select(osketch.sketchblocks.Item(SharedVariable("i"))) SharedVariable("i")=SharedVariable("i")+1 ElseIf osketch.type=84006912 Then If osketch.ChildBlocks.count=0 Then Exit Sub End If If SharedVariable("i")>osketch.ChildBlocks.count Then SharedVariable("i")=1 End If oSelectSet.select(osketch.ChildBlocks.Item(SharedVariable("i"))) SharedVariable("i")=SharedVariable("i")+1 End If End Sub