Hello i got a problem!
well i have been reading this book, this has to be the 3rd time reading it! and here is the code i'm trying to get working:
[code]
Option Explicit
Private Sub Command1_Click()
ToBeEnabledControl.Enabled = True
End Sub
Private Sub Form_Load()
Dim ctrl As Control
Dim ToBeEnabledControl As Control
For Each ctrl In Me.Controls
If Not (ctrl.Enabled) Then
Set ToBeEnabledControl = ctrl
Exit For
End If
Next
End Sub
[code/]
it never works....its suppose to search threw all
the controls on the form and if 1 of the controls
properites(Enabled property) is false it will
Enable it...
but there seems to be some problem....it says
Variable not defined and the "ControlToBeEnabed"
is the Var,Please help!
oh yeah and another question is...
Should you use Class Moduels just like regualr Moduels?
Because i wanna learn OOP and i wanna always use that technique(i know VB is all OOP)
but you know what i mean,
Like using Classes and what not, connecting everyting yoruself so it is much more cleaning and easier to debug,
i have been having alot of problems trying to make
Procedure that changes the caption of
all controls on a form, or centering text/form
on screen...
i think i may be taking it the wrong way about always
using Class Mods, if i am please inform me
[Edited by struntz on 08-22-2000 at 12:53 AM]





Reply With Quote