Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default Making comments show - momentarily

I have comments in cells to help guide users.

I would like to have the comments pop-up momentarily when a sheet is opened
in a workbook. Say - for a second or two.

Also, it would be great if this would only happen during the first 5 mins
the workbook is open - to stop them becoming annoying...

I there a way to do this?

Thanks,

Roger
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Making comments show - momentarily

On Sep 1, 3:53*pm, Roger on Excel
wrote:
I have comments in cells to help guide users.

I would like to have the comments pop-up momentarily when a sheet is opened
in a workbook. Say - for a second or two.

Also, it would be great if this would only happen during the first 5 mins
the workbook is open - to stop them becoming annoying...

I there a way to do this?

Thanks,

Roger


U may need to write the code to show the comments within the Auto_Open
module. Something of the following nature may help

Sub Auto_Open()
'
Sheets(1).Range("A2").Select
ActiveCell.Comment.Visible = True
Application.ScreenUpdating = True
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
ActiveCell.Comment.Visible = False
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Making comments show - momentarily

Only lightly tested (I haven't even tried save/close/reopen) but have a go
with this

' in ThisWorkbook module

Private Sub Workbook_Activate()
ShowHideComments True
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ShowHideComments
End Sub

Private Sub Workbook_Deactivate()
ShowHideComments
End Sub

Private Sub Workbook_Open()
gdtOpened = Now
ShowHideComments True
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ShowHideComments True
End Sub

''''' end Thisworkbook module

'' in a normal module
Public gdtOpened As Date
Public gdtHideTime As Date

Sub ShowHideComments(Optional bShow As Boolean)

If Now gdtOpened + TimeSerial(0, 1, 0) Then bShow = False

If bShow And TypeName(ActiveSheet) < "Chart" Then

If gdtHideTime 0 Then
Application.OnTime gdtHideTime, "ShowHideComments", , False
End If

If Application.DisplayCommentIndicator < xlCommentAndIndicator Then
Application.DisplayCommentIndicator = xlCommentAndIndicator
End If

gdtHideTime = Now + TimeSerial(0, 0, 2)
Application.OnTime gdtHideTime, "ShowHideComments"

ElseIf bShow = False And Application.DisplayCommentIndicator _
< xlCommentIndicatorOnly Then
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
gdtHideTime = 0
End If
End Sub

'' end code in normal module

Change TimeSerial(0, 1, 0) and TimeSerial(0, 0, 2) to suit, as written all
will revert to normal after one minute (you asked for 5) and within that
time comments should display for two seconds.

Regards,
Peter T

"Roger on Excel" wrote in message
...
I have comments in cells to help guide users.

I would like to have the comments pop-up momentarily when a sheet is
opened
in a workbook. Say - for a second or two.

Also, it would be great if this would only happen during the first 5 mins
the workbook is open - to stop them becoming annoying...

I there a way to do this?

Thanks,

Roger



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default Making comments show - momentarily

Perter,

This is excellent. Thankyou so much for your time.

Best regards,

Roger


"Peter T" wrote:

Only lightly tested (I haven't even tried save/close/reopen) but have a go
with this

' in ThisWorkbook module

Private Sub Workbook_Activate()
ShowHideComments True
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ShowHideComments
End Sub

Private Sub Workbook_Deactivate()
ShowHideComments
End Sub

Private Sub Workbook_Open()
gdtOpened = Now
ShowHideComments True
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ShowHideComments True
End Sub

''''' end Thisworkbook module

'' in a normal module
Public gdtOpened As Date
Public gdtHideTime As Date

Sub ShowHideComments(Optional bShow As Boolean)

If Now gdtOpened + TimeSerial(0, 1, 0) Then bShow = False

If bShow And TypeName(ActiveSheet) < "Chart" Then

If gdtHideTime 0 Then
Application.OnTime gdtHideTime, "ShowHideComments", , False
End If

If Application.DisplayCommentIndicator < xlCommentAndIndicator Then
Application.DisplayCommentIndicator = xlCommentAndIndicator
End If

gdtHideTime = Now + TimeSerial(0, 0, 2)
Application.OnTime gdtHideTime, "ShowHideComments"

ElseIf bShow = False And Application.DisplayCommentIndicator _
< xlCommentIndicatorOnly Then
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
gdtHideTime = 0
End If
End Sub

'' end code in normal module

Change TimeSerial(0, 1, 0) and TimeSerial(0, 0, 2) to suit, as written all
will revert to normal after one minute (you asked for 5) and within that
time comments should display for two seconds.

Regards,
Peter T

"Roger on Excel" wrote in message
...
I have comments in cells to help guide users.

I would like to have the comments pop-up momentarily when a sheet is
opened
in a workbook. Say - for a second or two.

Also, it would be great if this would only happen during the first 5 mins
the workbook is open - to stop them becoming annoying...

I there a way to do this?

Thanks,

Roger




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
Making comments appear in the center of the screen. Tonso Excel Discussion (Misc queries) 3 July 27th 06 12:13 AM
Momentarily Display Splash Screen MWS Excel Programming 8 February 7th 06 01:11 PM
extracting comments in a cell and making these part of the Chart . Charles Charts and Charting in Excel 2 April 19th 05 03:40 PM
Making comments apply to more than one cell Evelyn Excel Discussion (Misc queries) 2 February 9th 05 12:08 AM
Making blocks of text comments er Excel Programming 1 December 16th 04 08:46 PM


All times are GMT +1. The time now is 08:40 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"