現時点では正しくコンパイルされますが、実行して開いてボタンをクリックすると、C:\ から CheckedListBox1 にすべてのファイルが追加されますが、停止します...
Imports System.IO
Public Class Form1
Public Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles GetProfiles_Button.Click
Dim rootObject As String() = Directory.GetFiles("C:\")
For Each subObject As String In rootObject
searchObject(subObject)
Next
End Sub
Public Shared Sub searchObject(targetObject As String)
If File.GetAttributes(targetObject) = FileAttributes.Directory Then
Form1.CheckedListBox2.Items.Add(targetObject)
Dim subRoot As String() = Directory.GetFiles(targetObject)
For Each subRootObject As String In subRoot
searchObject(subRootObject)
Next
Else
Form1.CheckedListBox1.Items.Add(targetObject)
End If
End Sub
End Class