Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Tooltip Balloon in worksheet cells - Solution
After much searching I found a solution to a common question. How can I have
a tooltip on my worksheet for each cell. This method uses the Validation Object. I created the UDF on the worksheet code section using the Selection Change event. My goal was to click in a cell that had an induction date, then show a calculated Expected Delivery date using the date under the cursor plus an standard number of days it would take to travel to a destination. The number of days, named SS here, was a couple of cells over on the same worksheet. The EDD function takes into account weekends and holidays to give me my result. I found that the .delete was necessary to prevent errors when a cell that was previously used was selected. So here is my solution... Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim InDate As Date, SS As Integer, ExpDel As Date If Not Intersect(Target, Range("D:D")) Is Nothing Then InDate = DateValue(Trim(Target.Value)) SS = Target.Offset(0, 3).Value ExpDel = EDD(InDate, SS) With Target.Validation .Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, _ Operator:=xlBetween .IgnoreBlank = True .InputTitle = "Expected Delivery:" .InputMessage = Format(ExpDel, "mm/dd/yy ddd") .Delete End With End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
indirect referencing cells with hyperlinks brings text not link- any solution? | Excel Worksheet Functions | |||
Tooltip for macro button in a worksheet | Excel Worksheet Functions | |||
Solution To Auto Height For Merged Cells | Excel Programming | |||
problems w solution 4 enable AutoFilter for a protected worksheet | Excel Programming | |||
auto color blank cells ,best solution | Excel Discussion (Misc queries) |