The most pointless combination of functions

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
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
Down to:
Code:
Do While Door.Locked
    Do
        Mobile.Dial ("555-1234")
    Loop Until Mobile.Answer.Object = Missus
    Application.Wait (TimeValue(Nagging))
Loop
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:
Code:
dim herPatience as byte
:wink:
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I tried pasting into the code window and this line spontaneously appeared;

Code:
Set Missus.Mood(Today) = Rand()

and I couldn't delete it?
 
I tried the deleting all reference to "missus" and it deleted half my code in all my macro that I have ever create - I can't understand it.
 
I tried pasting into the code window and this line spontaneously appeared;

Code:
Set Missus.Mood(Today) = Rand()

and I couldn't delete it?


I think it interferes with the PMT function. Excel can't cope with both.
 
Aargh! It's writing itself, what does this mean?

Code:
If Missus.Mood(Today) <= Min(Tolerence) then
Shoes(Pairs) = Shoes(Pairs).Count + 1
End if
 
Greg:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
Due to the inherent volatility of the Missus object, I have decided to cut this down to a more stable piece of code:
Rich (BB code):
Rich (BB code):
Rich (BB code):
Sub Find_Keys()<o:p></o:p>
Dim Pockets As Range, Keys As Range<o:p></o:p>
Set Pockets = Range(Jacket.Pockets, Jeans.Pockets)<o:p></o:p>
Set Keys = Location(Keys)<o:p></o:p>
If Not Intersect(Pockets, Keys) Is Nothing Then<o:p></o:p>
    CarKeys.Found = True<o:p></o:p>
    Else<o:p></o:p>
        CarKeys.Found = False<o:p></o:p>
        Mobile.Dial(vbTaxi) Destination:= Office<o:p></o:p>
        Exit Home<o:p></o:p>
End If<o:p></o:p>
End Sub
 
I think it interferes with the PMT function. Excel can't cope with both.
:rofl:
Code:
 If Missus.Mood(Today) <= Min(Tolerence) then
Fascinating, I would rather have expected
Code:
Do Until Missus.Mood(Today) >= Min(Tolerence)...

Due to the inherent volatility of the Missus object, I have decided to cut this down to a more stable piece of code...
A most prudent observation & decision, methinks. I definitely think you've improved robustness. :biggrin:
 
=AND(AE1<>"",AE1=TODAY())

Might not be the most pointless conditional format ever...but im pretty new to this
 
If we were in .Net, then we could:
Code:
Try
    herPatience
Catch It
Finally
   BuyFlowers
End Try
 
=AND(AE1<>"",AE1=TODAY())

Might not be the most pointless conditional format ever...but im pretty new to this

Actually, I wouldn’t say that was pointless at all, you are testing that a cell contains today’s date and that it is not blank. I can think of several reasons why you would want to test this condition.
 

Forum statistics

Threads
1,222,681
Messages
6,167,587
Members
452,120
Latest member
Luis_Macros

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top