VBA Snippets
InputBox_SavedImageName
Public Function InputBox_SavedImageName() As String
InputBox_SavedImageName = _
Application.InputBox("Please Specify a name for the saved image", "Save Chart", "")
End Function
Message_CannotMoveItemDown
Public Sub Message_CannotMoveItemDown()
Dim sMessage As String
sMessage = "You can't move this item down."
Call MsgBox(sMessage, vbOKOnly + vbInformation, "Cannot move down")
Call Tracer_Add("MESSAGE", sMessage)
End Sub
Message_CannotMoveItemUp
Public Sub Message_CannotMoveItemUp()
Dim sMessage As String
sMessage = "You cannot move this item up."
Call MsgBox(sMessage, vbOKOnly + vbInformation, "Cannot Move Up")
Call Tracer_Add("MESSAGE", sMessage)
End Sub
Message_InvalidObjectSelected
Public Sub Message_InvalidObjectSelected()
Dim sMessage As String
sMessage = "You selected a " & TypeName(Selection) & ", this tool only exports range's and graphs."
Call MsgBox(sMessage, vbOKOnly + vbInformation, "Invalid Object")
Call Tracer_Add("MESSAGE", sMessage)
End Sub
Message_MustCloseFormFirst
Public Sub Message_MustCloseFormFirst( _
ByVal sFormName as String, _
ByVal sTitle As String)
Dim sMessage As String
sMessage = "You must close the '" & sFormName & "' dialog box first."
Call MsgBox(sMessage, vbOKOnly + vbInformation, sTitle)
Call Tracer_Add("MESSAGE", sMessage)
End Sub
Message_NoObjectSelected
Public Sub Message_NoObjectSelected()
Dim sMessage As String
sMessage = "There is no object selected."
Call MsgBox(sMessage, vbOKOnly + vbInformation, "No Object Selected")
Call Tracer_Add("MESSAGE", sMessage)
End Sub
Message_SelectionCopiedToClipboard
Public Sub Message_SelectionCopiedToClipboard()
Dim sMessage As String
sMessage = "Your selection was copied to the clipboard in the required format." & _
vbCrLf & vbCrLf & _
"Position your cursor, and paste (Ctrl + V)."
Call MsgBox(sMessage, vbOKOnly + vbInformation, "Selection Copied")
Call Tracer_Add("MESSAGE", sMessage)
End Sub
Message_ThemeHasBeenUpdated
Public Sub Message_ThemeHasBeenUpdated()
Dim sMessage As String
sMessage = "The colours in this workbook have been updated."
Call MsgBox(sMessage, vbOKOnly + vbInformation, "Colours Updated")
Call Tracer_Add("MESSAGE", sMessage)
End Sub
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top