Click here to Skip to main content
16,005,206 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Coloring Datagrids ! Pin
TigerNige6-Nov-05 23:54
TigerNige6-Nov-05 23:54 
GeneralRe: Coloring Datagrids ! Pin
microuser_20007-Nov-05 10:58
microuser_20007-Nov-05 10:58 
GeneralRe: Coloring Datagrids ! Pin
TigerNige7-Nov-05 11:48
TigerNige7-Nov-05 11:48 
GeneralRe: Coloring Datagrids ! Pin
TigerNige7-Nov-05 11:49
TigerNige7-Nov-05 11:49 
GeneralRe: Coloring Datagrids ! Pin
TigerNige7-Nov-05 11:50
TigerNige7-Nov-05 11:50 
Questionvisual basic with crystal reports Pin
ravi89_894-Nov-05 21:27
ravi89_894-Nov-05 21:27 
QuestionVB6 App Intall fails on Spanish Win/2000 Pin
s pereira4-Nov-05 12:44
s pereira4-Nov-05 12:44 
QuestionApply changes to this folder, subfolder and files Help. Pin
chabdesign4-Nov-05 11:01
chabdesign4-Nov-05 11:01 
Hi, I am trying to set the attributes for an entire tree for subfolders using VB 6.0, like it’s done in Explorer if you select “Apply changes to this folder, subfolder”.

The only way I can do this so far is to loop at each level. The following script is just getting me two levels down.

Does anyone a trick in changing the attributes on a folder that would replicate down to all levels of children? I have not found any posting where this was ever accomplished. So it would take a very smart person to figure this one out. ;- )

Thanks for sharing my problem and thinking about it.

Function File_Check()
'Test if the folders are read-Only
Dim objFSO, objFolder, colFiles, objFile, objSub, colSub, objFSO2, objFolder2, colSub2, objSub2, colFiles2, objFile2, colFiles1, bypass As Integer
Const ReadOnly = 1

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("G:\Internal")
Set colSub = objFolder.SubFolders
Set colFiles = objFolder.Files

For Each objFile In colFiles
If objFile.Attributes And ReadOnly Then
objFile.Attributes = objFile.Attributes Xor ReadOnly
End If
Next

For Each objSub In colSub
Set colFiles1 = objSub.Files
For Each objFile In colFiles1
If objFile.Attributes And ReadOnly Then
objFile.Attributes = objFile.Attributes Xor ReadOnly
End If
Next
'Repeat one layer down.
Set colSub2 = objSub.SubFolders

For Each objSub2 In colSub2
Set colFiles2 = objSub2.Files
For Each objFile2 In colFiles2
If objFile2.Attributes And ReadOnly Then
objFile2.Attributes = objFile2.Attributes Xor ReadOnly
End If
Next
Next

Next
End If
End Function
Sniff | :^)
QuestionUsing dll file Pin
EliBoby4-Nov-05 10:53
EliBoby4-Nov-05 10:53 
AnswerRe: Using dll file Pin
enjoycrack4-Nov-05 11:44
enjoycrack4-Nov-05 11:44 
GeneralRe: Using dll file Pin
EliBoby4-Nov-05 11:54
EliBoby4-Nov-05 11:54 
GeneralRe: Using dll file Pin
enjoycrack4-Nov-05 11:57
enjoycrack4-Nov-05 11:57 
GeneralRe: Using dll file Pin
EliBoby4-Nov-05 12:02
EliBoby4-Nov-05 12:02 
GeneralRe: Using dll file Pin
enjoycrack4-Nov-05 12:08
enjoycrack4-Nov-05 12:08 
GeneralRe: Using dll file Pin
EliBoby4-Nov-05 12:51
EliBoby4-Nov-05 12:51 
GeneralRe: Using dll file Pin
enjoycrack4-Nov-05 13:06
enjoycrack4-Nov-05 13:06 
GeneralRe: Using dll file Pin
EliBoby4-Nov-05 13:20
EliBoby4-Nov-05 13:20 
GeneralRe: Using dll file Pin
Dave Kreskowiak4-Nov-05 15:21
mveDave Kreskowiak4-Nov-05 15:21 
GeneralRe: Using dll file Pin
DA_Loring10-Nov-05 0:08
DA_Loring10-Nov-05 0:08 
QuestionPassing information to Form2 Pin
PAEC4-Nov-05 9:40
PAEC4-Nov-05 9:40 
AnswerRe: Passing information to Form2 Pin
KaptinKrunch4-Nov-05 10:43
KaptinKrunch4-Nov-05 10:43 
QuestionHitting enter in a DataGrid Pin
dptalt4-Nov-05 8:47
dptalt4-Nov-05 8:47 
QuestionRegula expressions Pin
elms4-Nov-05 7:13
elms4-Nov-05 7:13 
AnswerRe: Regula expressions Pin
glabbertronic4-Nov-05 9:29
glabbertronic4-Nov-05 9:29 
QuestionUsing regular Xpressions Pin
elms4-Nov-05 7:12
elms4-Nov-05 7:12 

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.