Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Notification

I have a userform to input some data. After the user presses the "enter"
button, the data is recorded.

I've been asked to have an indicator that flashes for a moment to indicate
that information is being saved.

I was thinking of having text in a label that would say "SAVING..." in red
letters for a second or two. How would I accomplish that?

Thank you,

David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Notification

What about doing it the standard way and use the Status Bar?

StatusBarStatus = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Processing... please wait"
'
' Your code goes here
'
Application.StatusBar = False
Application.DisplayStatusBar = StatusBarStatus

--
Rick (MVP - Excel)


"David Gerstman" wrote in message
...
I have a userform to input some data. After the user presses the "enter"
button, the data is recorded.

I've been asked to have an indicator that flashes for a moment to indicate
that information is being saved.

I was thinking of having text in a label that would say "SAVING..." in red
letters for a second or two. How would I accomplish that?

Thank you,

David


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default Notification

Nice and easy

Private Sub CommandButton1_Click()
With Label1
.Caption = "Saving..."
.ForeColor = &HFF&
End With
End Sub

"Rick Rothstein" wrote:

What about doing it the standard way and use the Status Bar?

StatusBarStatus = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Processing... please wait"
'
' Your code goes here
'
Application.StatusBar = False
Application.DisplayStatusBar = StatusBarStatus

--
Rick (MVP - Excel)


"David Gerstman" wrote in message
...
I have a userform to input some data. After the user presses the "enter"
button, the data is recorded.

I've been asked to have an indicator that flashes for a moment to indicate
that information is being saved.

I was thinking of having text in a label that would say "SAVING..." in red
letters for a second or two. How would I accomplish that?

Thank you,

David



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Notification

Jeff,

This accomplishes half of what I want.

If I want the "Saving ..." message to appear for a limited time, say a
second or two, is there some way to do that?

Thank you,

David

"Jeff" wrote:

Nice and easy

Private Sub CommandButton1_Click()
With Label1
.Caption = "Saving..."
.ForeColor = &HFF&
End With
End Sub

"Rick Rothstein" wrote:

What about doing it the standard way and use the Status Bar?

StatusBarStatus = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Processing... please wait"
'
' Your code goes here
'
Application.StatusBar = False
Application.DisplayStatusBar = StatusBarStatus

--
Rick (MVP - Excel)


"David Gerstman" wrote in message
...
I have a userform to input some data. After the user presses the "enter"
button, the data is recorded.

I've been asked to have an indicator that flashes for a moment to indicate
that information is being saved.

I was thinking of having text in a label that would say "SAVING..." in red
letters for a second or two. How would I accomplish that?

Thank you,

David



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default Notification

In Short? yes. The trouble is that you may be sacrificing performance for
convenience.
I suggest placing my previous post at the beginning of the Button_Click
event and return the original properties at the end. Something like this;

Sub CommandButton1_Click()
With Label1
.Caption = "Saving..."
.ForeColor = &HFF&
End With

€˜Your Code here

With Label1
.Caption = "Save€
.ForeColor = &H80000012
End With
End Sub
This way youre only adding a few lines of code and not having any
unnecessary waiting
You get youre message across for as long as it needed and thats it.



"David Gerstman" wrote:

Jeff,

This accomplishes half of what I want.

If I want the "Saving ..." message to appear for a limited time, say a
second or two, is there some way to do that?

Thank you,

David

"Jeff" wrote:

Nice and easy

Private Sub CommandButton1_Click()
With Label1
.Caption = "Saving..."
.ForeColor = &HFF&
End With
End Sub

"Rick Rothstein" wrote:

What about doing it the standard way and use the Status Bar?

StatusBarStatus = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Processing... please wait"
'
' Your code goes here
'
Application.StatusBar = False
Application.DisplayStatusBar = StatusBarStatus

--
Rick (MVP - Excel)


"David Gerstman" wrote in message
...
I have a userform to input some data. After the user presses the "enter"
button, the data is recorded.

I've been asked to have an indicator that flashes for a moment to indicate
that information is being saved.

I was thinking of having text in a label that would say "SAVING..." in red
letters for a second or two. How would I accomplish that?

Thank you,

David




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Notification

Two things... First, I would use an ActiveX Label control and pre-set it up
(by sizing it, its font, its back and fore colors), then set its Visible
property to False, and then have your code make it visible before you start
your existing code and invisible once your existing code is finished.
Second, if using a Label, you will need to examine where to locate it in
case the user scrolls the worksheet (so that the Label is scrolled
off-screen). I think a construction like this can handle both of these
points...

Dim Obj As OLEObject
With Worksheets("Sheet4").OLEObjects("Label1")
.Top = Rows(ActiveWindow.ScrollRow).Top + _
ActiveWindow.Height / 2 - .Height
.Left = Columns(ActiveWindow.ScrollColumn).Left + _
ActiveWindow.Width / 2 - .Width / 2
.Visible = True
'
' << Your code goes here
'
.Visible = False
End With

--
Rick (MVP - Excel)


"David Gerstman" wrote in message
...
Jeff,

This accomplishes half of what I want.

If I want the "Saving ..." message to appear for a limited time, say a
second or two, is there some way to do that?

Thank you,

David

"Jeff" wrote:

Nice and easy

Private Sub CommandButton1_Click()
With Label1
.Caption = "Saving..."
.ForeColor = &HFF&
End With
End Sub

"Rick Rothstein" wrote:

What about doing it the standard way and use the Status Bar?

StatusBarStatus = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Processing... please wait"
'
' Your code goes here
'
Application.StatusBar = False
Application.DisplayStatusBar = StatusBarStatus

--
Rick (MVP - Excel)


"David Gerstman" wrote in message
...
I have a userform to input some data. After the user presses the
"enter"
button, the data is recorded.

I've been asked to have an indicator that flashes for a moment to
indicate
that information is being saved.

I was thinking of having text in a label that would say "SAVING..."
in red
letters for a second or two. How would I accomplish that?

Thank you,

David



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Notification

Hi,

There are many ways of doing this and here's one. Put these few lines of
code at the start of you 'Enter Button' code and you get a messagebox that
stays there for 3 seconds or until the user presses a button. Change the time
delay and message to suit your needs.


Dim Msg As String
Dim Secs As Long
Dim Wsh As Object
Title = "User Message"
Msg = "Saving data."
Secs = 3
Set Wsh = CreateObject("WScript.Shell")
RetVal = Wsh.Popup(Msg, Secs, Title, vbInformation + vbOKCancel)
Set Wsh = Nothing

Mike

"David Gerstman" wrote:

I have a userform to input some data. After the user presses the "enter"
button, the data is recorded.

I've been asked to have an indicator that flashes for a moment to indicate
that information is being saved.

I was thinking of having text in a label that would say "SAVING..." in red
letters for a second or two. How would I accomplish that?

Thank you,

David

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Notification

Hi

Set up you userform with a lable which in my exaple is named Label1. In the
properties for the label enter the desired message in "Caption", set
ForeColor to red and Visible =False.

Private Sub CommandButton1_Click()
Me.Label1.Visible = True
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 2' Change number to change visible time
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
Me.Hide
Unload Me
End Sub

Regards,
Per

"David Gerstman" skrev i meddelelsen
...
I have a userform to input some data. After the user presses the "enter"
button, the data is recorded.

I've been asked to have an indicator that flashes for a moment to indicate
that information is being saved.

I was thinking of having text in a label that would say "SAVING..." in red
letters for a second or two. How would I accomplish that?

Thank you,

David


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Notification Ron100 Excel Discussion (Misc queries) 1 January 12th 10 07:18 PM
Notification Dave Excel Worksheet Functions 3 April 24th 08 10:53 PM
Automatic Notification cabbitt Excel Discussion (Misc queries) 1 April 2nd 06 05:21 PM
Notification Duncan[_5_] Excel Programming 4 January 11th 06 08:31 AM
Email notification kelly Excel Programming 3 February 26th 04 08:30 PM


All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"