Populate combo box with directories from a given path 
Author Message
 Populate combo box with directories from a given path

Hi There

The following function works inside Vb,  How can I replicate the
functionality inside a outlook 98 form.

sub FillComboSaveAs
'Populate combo box with directories from a given path
 nPath = "I:\images\"   ' Set the path.
 fName = Dir(nPath, vbDirectory)   ' Retrieve the first entry.
 Do While MyName <> ""   ' Start the loop.
    ' Ignore the current directory and the encompassing directory.
    If MyName <> "." And fName <> ".." Then
       ' Use bitwise comparison to make sure fName is a directory.
       If (GetAttr(nPath & fName ) And vbDirectory) = vbDirectory Then
   cboSaveAs.additem fName
       End If   ' it represents a directory.
    End If
    fName = Dir   ' Get next entry.
 Loop
end sub



Sat, 07 Dec 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Populating a combo box from another combo box

2. Populate a combo box from another combo box selection

3. Creating relative directory path given fully-qualified path

4. Unable to populate text box from combo box

5. populate text box from combo box (same form)

6. Populate a table with the path and file from a directory

7. VB Question - Data Bound Combo & Directory Path

8. Populate a combo box with code

9. Populating a Combo Box with Drive Names

10. Populating multiple combo boxes with the first row of query

11. Populating a combo box using a function

12. Populating Combo Boxes With Dates

 

 
Powered by phpBB® Forum Software