Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim AcadApp As Object
Dim AcadDoc As Object
TextBox1.Text = ListBox1
'Check if AutoCAD application is open. If is not opened create a new instance and make it visible.
Set AcadApp = GetObject(, "AutoCAD.Application")
Set AcadDoc = AcadApp.ActiveDocument
AcadDoc.ActiveLayout = AcadDoc.Layouts.Item(CStr(ListBox1))
End Sub