2 ms·
Hold my beer. Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range) Dim intRetval As Integer ' TODO maybe respect som
by josephcsible 4y ago
Hold my beer.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Dim intRetval As Integer
' TODO maybe respect some of the properties on Assistant to let the user disable this
If InStr(Target.Formula, "VLOOKUP") = 0 Then
Exit Sub
End If
' TODO is one use really "excessive"?
Assistant.Visible = True
With Assistant.NewBalloon
' TODO I should probably do ".Mode = msoModeModeless" but I don't feel like writing a callback
.Text = "It looks like you're trying to implement a relational database in a spreadsheet."
.Labels(1).Text = "Get professional help"
.Labels(2).Text = "Just let me generate excessive technical debt without help"
.CheckBoxes(1).Text = "Don't show me this tip again"
.Button = msoButtonSetNone
.Animation = msoAnimationGetAttentionMinor
intRetval = .Show
' TODO make the user's choices actually do something
End With
End Sub
You'll need to load Office 97 or some other ancient version in a VM if you want to actually try this, since Microsoft finally killed off Clippit completely in Office 2007.