| he File controls don't require a lot of code. You probably won't want to create a full replacement for the CommonDialog control, but when you need to have your users select drives, paths, and files from a list, this example shows you how it's done. Option Explicit Private Sub drvData_Change() On Error Resume Next 'no disk in drive, etc. dirData.Path = drvData.Drive If Err Then 'switch to dir control's drive Beep drvData.Drive = dirData.Path End If End Sub Private Sub dirData_Change() filData.Path = dirData.Path End Sub Private Sub filData_Click() txtFile = filData.Path If Right$(txtFile, 1) = "\" Then txtFile = txtFile & _ filData.List(filData.ListIndex) Else txtFile = txtFile & "\" & _ filData.List(filData.ListIndex) End If End Sub |
File Controls Use Includes Drive Selection |
Express News India | Freelance ecommerce web development India