Extending existing coding to include new parameters
In article , GS writes
You're very welcome! Glad you were able to sort it out. Next time..,
I'll be less presumptuous!<g
Hi Garry
Just out of interest , how would you add a colour (say Green) to the
word 'Open' in the Function code? I toyed with it but could find no
successful way. There seem to be many codes for colour implementation in
VBA, but none that work...
Function Get_ShopOpenStatus(CurrentTime As Variant) As String
Dim vShopOpens, vShopCloses
vShopOpens = TimeValue("8:00 AM")
vShopCloses = TimeValue("4:30 PM")
If TimeValue(Now) vShopOpens And TimeValue(Now) < vShopCloses Then _
Get_ShopOpenStatus = "open." Else Get_ShopOpenStatus = "closed."
End Function
Thanks Garry.
|