VBA - Populate ListBox With Action Recorders

VBA - Populate ListBox With Action Recorders

patersonc
Explorer Explorer
1,193 Views
1 Reply
Message 1 of 2

VBA - Populate ListBox With Action Recorders

patersonc
Explorer
Explorer

Is there a way to populate a ListBox with all of my Action Recorders?

0 Likes
Accepted solutions (1)
1,194 Views
1 Reply
Reply (1)
Message 2 of 2

patersonc
Explorer
Explorer
Accepted solution

I got it!!

 

There might be a cleaner way, but it works.  In case anybody want's to know, here's what I did:

 

Private Sub UserForm_Initialize()

     Dim ActionRecFdr As String

     ActionRecFdr = Dir(ThisDrawing.GetVariable("ACTRECPATH") & "\*.actm")

    Do While ActionRecFdr <> ""

         comActionRecorders.AddItem Left(ActionRecFdr, Len(ActionRecFdr) - 5)

        ActionRecFdr = Dir

    Loop

    comActionRecorders.ListIndex = 0

End Sub