VBA Snippets


Message_ItemSavedAsPicture

Public Sub Message_ItemSavedAsPicture( _
ByVal sFolderPath As String, _
ByVal sChartName As String)

Dim sMessage As String
Dim sSelectionType As String
sSelectionType = TypeName(Selection)
If Chart_ObjectValid(sSelectionType, False) = True Then
sSelectionType = "Chart"
End If
sMessage = "The selected '" & sSelectionType & "' was saved to " & _
vbCrLf & vbCrLf & _
sFolderPath & sChartName

Call MsgBox(sMessage, vbOKOnly + vbInformation, "Item Saved")
Call Tracer_Add("MESSAGE", sMessage)
End Sub

Question_AnnotationOnWorksheet

Public Function Question_AnnotationOnWorksheet() As VbMsgBoxResult

Dim sMessage As String
Dim response As VbMsgBoxResult
sMessage = "Do you want to put this annotation on the worksheet ?" & _
vbCrLf & vbCrLf & _
"If you want to add an annotation to a chart you must select the chart first."

response = MsgBox(sMessage, vbYesNo + vbInformation, "Worksheet Annotation")
Call Tracer_Add("QUESTION", sMessage)
Question_AnnotationOnWorksheet = response
End Function

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top