I would like to have this program see any file (.lyr) in a directory and list it...
Right now I need to enter the file name into my program in order for the program to find it
Here is how I have it now...
This is only my thrid problem I have written in VBA...Code:Private Sub MultiPage1_Change() 'This is where you list the file you want to use for the layers lstDat.Clear ListlayerName.Clear ListLayerColor.Clear ListLayerStyle.Clear Select Case MultiPage1.SelectedItem.Caption Case " A" lblDiscipline.Caption = "Architectural" If MultiPage1.Arch.LstCata.ListCount = 0 Then MultiPage1.Arch.LstCata.AddItem "A-Gen-Layer" MultiPage1.Arch.LstCata.AddItem "A-Clg-Layer" MultiPage1.Arch.LstCata.AddItem "A-DorWin-Layer" MultiPage1.Arch.LstCata.AddItem "A-Floor-Layer" MultiPage1.Arch.LstCata.AddItem "A-Wall-Layer" MultiPage1.Arch.LstCata.AddItem "A-Site-Layer" MultiPage1.Arch.LstCata.AddItem "A-Roof-Layer" MultiPage1.Arch.LstCata.AddItem "A-Circ-Layer" End If Case " C" lblDiscipline.Caption = "Civil" If MultiPage1.Civil.lstCatc.ListCount = 0 Then MultiPage1.Civil.lstCatc.AddItem "C-Site-Layer" MultiPage1.Civil.lstCatc.AddItem "C-Grading-Pave" MultiPage1.Civil.lstCatc.AddItem "C-Uity-Layer" MultiPage1.Civil.lstCatc.AddItem "C-Sheet-File-Names" MultiPage1.Civil.lstCatc.AddItem "C-Model-File-Names" End If Case " E" lblDiscipline.Caption = "Electrical" If MultiPage1.Elect.lstCate.ListCount = 0 Then MultiPage1.Elect.lstCate.AddItem "E-Light-Layer" MultiPage1.Elect.lstCate.AddItem "E-Power-Layer" MultiPage1.Elect.lstCate.AddItem "E-Misc-Layer" End If Case " M" lblDiscipline.Caption = "Mechanical" If MultiPage1.Mech.lstCatm.ListCount = 0 Then MultiPage1.Mech.lstCatm.AddItem "M-HVAC-Layer-1" MultiPage1.Mech.lstCatm.AddItem "M-HVAC-Layer-2" MultiPage1.Mech.lstCatm.AddItem "M-HVAC-Layer-3" MultiPage1.Mech.lstCatm.AddItem "M-HVAC-Layer-4" MultiPage1.Mech.lstCatm.AddItem "M-Plum-Layer" MultiPage1.Mech.lstCatm.AddItem "M-Fire-Layer" End If Case " S" lblDiscipline.Caption = "Structural" If MultiPage1.Struct.lstCats.ListCount = 0 Then MultiPage1.Struct.lstCats.AddItem "S-Layer-List-1" MultiPage1.Struct.lstCats.AddItem "S-Layer-List-2" MultiPage1.Struct.lstCats.AddItem "S-Layer-List-3" MultiPage1.Struct.lstCats.AddItem "S-Layer-List-4" End If Case " G" lblDiscipline.Caption = "General" If MultiPage1.General.lstcatg.ListCount = 0 Then MultiPage1.General.lstcatg.AddItem "G-General-Text" MultiPage1.General.lstcatg.AddItem "G-Border-Layer" MultiPage1.General.lstcatg.AddItem "G-Elev-Layer" MultiPage1.General.lstcatg.AddItem "G-Sec-Layer" MultiPage1.General.lstcatg.AddItem "G-Schd-Layer" MultiPage1.General.lstcatg.AddItem "G-Detail-Layer" End If End Select End Sub
Thanks