Greg Truby
MrExcel MVP
- Joined
- Jun 19, 2002
- Messages
- 10,030
To Lewiy --
Just skimmed it quickly...
You do not need to test booleans for true or false, they ARE true for false, i.e. you can tighten
Down to:
Also please note that (as Bryony has pointed out) Nagging is a long, not a string so Len(Nagging) is always going to return 4.
Any finally, your variable Patience (no relation to Bryony) is ambiguous. You need to specify herPatience or myPatience. If hers then obviously it's:
:wink:
Just skimmed it quickly...
You do not need to test booleans for true or false, they ARE true for false, i.e. you can tighten
Code:
Do
With Door
If .Locked = True Then
Do
Mobile.Dial ("555-1234")
Loop Until Mobile.Answer.Object = Missus
Application.Wait (TimeValue(Len(Nagging)))
End If
End With
Loop Until Door.Locked = False
Code:
Do While Door.Locked
Do
Mobile.Dial ("555-1234")
Loop Until Mobile.Answer.Object = Missus
Application.Wait (TimeValue(Nagging))
Loop
Any finally, your variable Patience (no relation to Bryony) is ambiguous. You need to specify herPatience or myPatience. If hers then obviously it's:
Code:
dim herPatience as byte