View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Message telling calculation is complete

Making a change to some cells on a sheet and having the message box pop up would
require event code behind the worksheet.

But that would run every time any change was made and a calculation took place
even if for a nano-second.

That would annoy the heck out of me.

I would restrict the code to a specfic macro that ran for some some length of
time rather than at any calculation.


Gord



On Thu, 1 May 2008 07:08:00 -0700, deeds
wrote:

Thanks....this looks like I could make work. However, if for instance on
sheet1 the user makes a change to a cell or group of cells...how do I get
something like this to automatically run. In other words I want to mimic the
Excel calculation meter. So, automatically after changes are made and Excel
starts to calculate...a message box appears telling user the calc is
complete. Thanks again.

"Gord Dibben" wrote:

OK.....no progress bar but a message when calculation is complete.

Sample code.

Runs on a worksheet with data in A1:Z1600 and copies that data to one column in
an added worksheet named "CopyTo"

Sub rowstocol()
Dim wks As Worksheet
Dim colnos As Long
Dim CopytoSheet As Worksheet

If ActiveSheet.Name = "Copyto" Then
MsgBox "Active Sheet Not Valid" & Chr(13) _
& "Try Another Worksheet."
Exit Sub
Else
Set wks = ActiveSheet
Application.ScreenUpdating = False
For Each Wksht In Worksheets
With Wksht
If .Name = "Copyto" Then
Application.DisplayAlerts = False
Sheets("Copyto").Delete
End If
End With
Next
Application.DisplayAlerts = True
Set CopytoSheet = Worksheets.Add
CopytoSheet.Name = "Copyto"
wks.Activate
Range("A1").Select
colnos = 26
StartTime = Timer
Do Until ActiveCell.Value = ""
ActiveCell.Offset(1, 0).Select
With ActiveCell
.Resize(1, colnos).Copy
End With
Sheets("Copyto").Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, _
SkipBlanks:=False _
, Transpose:=True
Application.CutCopyMode = False
ActiveSheet.Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select
ActiveCell.Offset(2, 0).Select
Selection.EntireRow.Insert
wks.Activate
ActiveCell.Select
Loop
Sheets("Copyto").Activate
End If
MsgBox "Calculation is complete. Elapsed Time was " _
& Timer - StartTime & " Seconds"

'MsgBox "Calculation is complete"

End Sub

Add the Timer and msgbox or just the msgbox at end.


Gord

On Wed, 30 Apr 2008 08:33:01 -0700, deeds
wrote:

Thanks for checking on this. Ultimately all I want to accomplish is a little
progress bar OR just something simple like a box that pops up or shows up in
a cell that says..."Calculation Complete" Right now the way the users
computer is working...they can't see the "Excel calc meter" and so, the only
way for them to see the calc is complete is when the curser changes to an
pointing arrow.
Any help/ideas would be great.

Thanks again!