Click here to Skip to main content
15,886,798 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionDatagridview control Pin
roitha7-May-06 15:15
roitha7-May-06 15:15 
AnswerRe: Datagridview control Pin
svincoll47-May-06 19:30
svincoll47-May-06 19:30 
AnswerRe: Datagridview control Pin
svincoll47-May-06 19:31
svincoll47-May-06 19:31 
GeneralRe: Datagridview control Pin
roitha7-May-06 22:09
roitha7-May-06 22:09 
QuestionSave Selected Outlook Emails Pin
smarttom997-May-06 11:12
smarttom997-May-06 11:12 
QuestionSearching for files using vb.net 2005 Pin
mitsroff7-May-06 9:49
mitsroff7-May-06 9:49 
AnswerRe: Searching for files using vb.net 2005 Pin
CWIZO7-May-06 21:50
CWIZO7-May-06 21:50 
AnswerRe: Searching for files using vb.net 2005 Pin
Yuvi Panda7-May-06 22:01
Yuvi Panda7-May-06 22:01 
Well, that's because you don't have enough permission to access that directory. You can just ignore that by moving the Try Block inside the loop, like this :

VB.NET
 Private Sub DirSearch(ByVal sDir As String)

Dim arrLst As New ArrayList
Dim _dir As String
Dim _file As String

For Each _dir In Directory.GetDirectories(sDir)
Try
For Each _file In Directory.GetFiles(_dir, txtFile.Text)
Try
arrLst.Add(_file)
Catch ex as IOException
Continue
End Catch
Next
DirSearch(_dir)
Catch ex as IOException
Continue 
End Try
Next

End Sub


That should fix it. The Continue statements continue the loop into the next iteration, so that exception should be ignored..



Yuvi Panda T
15 year old Microsoft Student Partner
Blogs at : http://yuvipanda.blogspot.com
QuestionDisplay Windows logoff dialog box Pin
setedivento7-May-06 6:41
setedivento7-May-06 6:41 
AnswerDisplay Windows logoff dialog box Pin
setedivento7-May-06 9:13
setedivento7-May-06 9:13 
GeneralRe: Display Windows logoff dialog box Pin
setedivento7-May-06 22:03
setedivento7-May-06 22:03 
GeneralRe: Display Windows logoff dialog box Pin
User 17164928-May-06 15:16
professionalUser 17164928-May-06 15:16 
GeneralRe: Display Windows logoff dialog box Pin
setedivento8-May-06 22:52
setedivento8-May-06 22:52 
GeneralRe: Display Windows logoff dialog box Pin
setedivento9-May-06 4:07
setedivento9-May-06 4:07 
GeneralRe: Display Windows logoff dialog box Pin
User 17164929-May-06 7:43
professionalUser 17164929-May-06 7:43 
GeneralRe: Display Windows logoff dialog box Pin
setedivento9-May-06 13:15
setedivento9-May-06 13:15 
Questionformat(string, "dd/MM/yyyy") as date Pin
pptadam7-May-06 4:32
pptadam7-May-06 4:32 
AnswerRe: format(string, "dd/MM/yyyy") as date Pin
Paul Conrad7-May-06 5:02
professionalPaul Conrad7-May-06 5:02 
AnswerRe: format(string, "dd/MM/yyyy") as date Pin
Guffa7-May-06 5:41
Guffa7-May-06 5:41 
Questionmsfgrid in VB.net Pin
viji]7-May-06 1:49
viji]7-May-06 1:49 
AnswerRe: msfgrid in VB.net Pin
Mekong River7-May-06 5:37
Mekong River7-May-06 5:37 
Questiondatagridview columns text alignment Pin
G723607-May-06 1:30
G723607-May-06 1:30 
AnswerRe: datagridview columns text alignment Pin
Mekong River7-May-06 5:42
Mekong River7-May-06 5:42 
QuestionExtract Data from A WebSite through a WebBrowser Control? Pin
TehCheeze7-May-06 0:45
TehCheeze7-May-06 0:45 
AnswerRe: Extract Data from A WebSite through a WebBrowser Control? Pin
Kessica8-May-06 1:34
Kessica8-May-06 1:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.