JohnMitchell
New Member
- Joined
- Jun 8, 2010
- Messages
- 10
Alternative to MsgBox if you're just notifying the user about
something. User doesn't have to click OK.
something. User doesn't have to click OK.
Code:
Sub MsgTxtBox()
Dim ws As Worksheet
Dim box As Shape
Set ws = ActiveSheet
Set box = ws.Shapes.AddTextbox(msoTextOrientationHorizontal, 350, 180, 150, 50)
box.TextFrame.Characters.Text = "Thank You !"
box.TextFrame.HorizontalAlignment = xlHAlignCenter
box.TextFrame.VerticalAlignment = xlVAlignCenter
box.Fill.ForeColor.RGB = RGB(255, 255, 255)
box.TextFrame.Characters.Font.Color = RGB(255, 0, 0)
box.TextFrame.Characters.Font.Bold = True
box.TextFrame.Characters.Font.Size = 24
Application.ScreenUpdating = True
Application.Wait (Now + TimeValue("00:00:01"))
box.Delete
Set box = Nothing
End Sub