Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Need warning message before a user changes worksheet

I have a worksheet called "Data". Anytime a user selects an entire
row I would like for a warning to appear that says "If you insert,
delete, or copy and insert rows in the top section, you must make the
same changes in the bottom section." Then, I want the user to be able
to click OK on the warning and proceed with whatever changes they
decide to make. The problem I have is how to keep the warning from
appearing again immediately when, for example, the user proceeds to
insert a row. Is there a timer I could use so the warning would not
occur again for some number of minutes?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 259
Default Need warning message before a user changes worksheet

On 14/02/2012 8:26 AM, JG Scott wrote:
I have a worksheet called "Data". Anytime a user selects an entire
row I would like for a warning to appear that says "If you insert,
delete, or copy and insert rows in the top section, you must make the
same changes in the bottom section." Then, I want the user to be able
to click OK on the warning and proceed with whatever changes they
decide to make. The problem I have is how to keep the warning from
appearing again immediately when, for example, the user proceeds to
insert a row. Is there a timer I could use so the warning would not
occur again for some number of minutes?


Hi JG

Sub myWarning()
Dim WarnMess as integer
WarnMess = ("Danger Will Robinson, you are about to do something
monumentally Stupid! Are you sure you want to continue...", vbYesNo)
If WarnMess = vbNo then
Cancel = True
Else
'Do your thing here
End If
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Need warning message before a user changes worksheet

Pick a cell on the worksheet to store a date & time. I will use cell
T1 to illustrate and assume the user will not try inserting a new row
1. Add the following to the worksheet's code window:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row 1 And Now - Range("T1") 1 / 24 / 60 Then
MsgBox ("Your warning.")
Range("T1") = Now()
End If
End Sub

It will not warn again if a warning was given within the last minute.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Need warning message before a user changes worksheet

JG Scott explained :
I have a worksheet called "Data". Anytime a user selects an entire
row I would like for a warning to appear that says "If you insert,
delete, or copy and insert rows in the top section, you must make the
same changes in the bottom section." Then, I want the user to be able
to click OK on the warning and proceed with whatever changes they
decide to make. The problem I have is how to keep the warning from
appearing again immediately when, for example, the user proceeds to
insert a row. Is there a timer I could use so the warning would not
occur again for some number of minutes?


I suggest protecting the sheet and adding a menu or button that
appropriately automates the row insertion in both places.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default Need warning message before a user changes worksheet

Could be done if you can ensure that users would be selecting entire
rows.

That entirerow selection event can be trapped and a timer set to allow
entire rows to be selected and inserted for any period of time you
want before events are re-enabled and the warning re-triggered

But some events, like inserting a row via the insert row Icon or
right-clickinsertentire row or ctrl + shift++ are not trappable
events.

How would you deal with those?

How would you deal with the user who inserted the rows anyway but did
not insert them in the bottom section?

I think it may be easier to train your users.


Gord


On Mon, 13 Feb 2012 13:26:43 -0800 (PST), JG Scott
wrote:

I have a worksheet called "Data". Anytime a user selects an entire
row I would like for a warning to appear that says "If you insert,
delete, or copy and insert rows in the top section, you must make the
same changes in the bottom section." Then, I want the user to be able
to click OK on the warning and proceed with whatever changes they
decide to make. The problem I have is how to keep the warning from
appearing again immediately when, for example, the user proceeds to
insert a row. Is there a timer I could use so the warning would not
occur again for some number of minutes?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Need warning message before a user changes worksheet

Gord Dibben was thinking very hard :
I think it may be easier to train your users.


But, Gord, you KNOW it would be better lock users out of messing with
the sheet structure AND automate the various processes! ...Right?<bg

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


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
How to get rid of the warning message RJ Setting up and Configuration of Excel 2 March 27th 09 05:35 PM
Message Box Warning Tio Pepe Excel Programming 1 March 15th 09 04:37 AM
using VBA how can I delete a worksheet w/o the warning message pop Jim K.[_2_] Excel Discussion (Misc queries) 2 July 1st 08 04:00 PM
Warning Message MLK Excel Worksheet Functions 2 June 29th 06 11:55 AM
How do I input a warning message to remind the user to enter into. sugarbrit17 Excel Discussion (Misc queries) 3 January 25th 05 08:31 PM


All times are GMT +1. The time now is 06:57 PM.

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

About Us

"It's about Microsoft Excel"