Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Simple message box question

I am trying to create a simple message box which will display after I open
the Excel file and if I try to make any change to a document is being made.
If the selection is "Yes" in the messsage box, the change I am making in the
document will be allowed. If the selection is "No" in the message box, the
change will not be allowed. The message box needs to be repeated if I select
"No" and again try to make a change. The message box requirement is really
simple, it just has to say: "Have you updated the dates?" If "Yes", the
change is allowed. If "No", change is not allowed. If after "No", change is
again tried, message box pops up again.

Thanks in advance for your help
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default Simple message box question

This can be done with some above-average programming skills- how
familiar are you with this? It would involve an "on change" event
triggered by making a change to the spreadsheet, then modifying a named
range or hidden cell value to TRUE or FALSE depending on the answer to
your message box, then allowing or disallowing subsequent changes based
on the value of that named range or hidden cell value.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Simple message box question

If you can give me a snippet, I can complete it. Right now I do not have a
direction.

"Dave O" wrote:

This can be done with some above-average programming skills- how
familiar are you with this? It would involve an "on change" event
triggered by making a change to the spreadsheet, then modifying a named
range or hidden cell value to TRUE or FALSE depending on the answer to
your message box, then allowing or disallowing subsequent changes based
on the value of that named range or hidden cell value.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Simple message box question

If you can give me a snippet, I can complete it. Right now I dont have a
direction.

"Dave O" wrote:

This can be done with some above-average programming skills- how
familiar are you with this? It would involve an "on change" event
triggered by making a change to the spreadsheet, then modifying a named
range or hidden cell value to TRUE or FALSE depending on the answer to
your message box, then allowing or disallowing subsequent changes based
on the value of that named range or hidden cell value.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default Simple message box question

Here's a stab at it. Create a named range in your workbook called
DatesUpdated, then use this code to reset that value to False when the
workbook opens:

Private Sub Workbook_Open()
'reset named range to False upon opening of workbook
Names("DatesUpdated").Value = False
End Sub

This *should* work, but for some reason does not when I enter it as an
on-change event for a worksheet. I can't get the named range to
evaluate or assign a value to it from the "on worksheet change" event.
As separate code in a module (i.e. not associated with a trigger event)
it does work and does change the value of the named range. I'm stuck.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Response As String
If Evaluate(Names("DatesUpdated").Value) = False Then
Application.Undo
Response = InputBox("Have you updated the dates?", vbYesNo)
If Response = vbYes Then
Names("DatesUpdated").Value = True
End If
End If
End Sub

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
Simple message box question zeyneddine Excel Discussion (Misc queries) 1 August 14th 06 08:23 PM
Simple graph formatting question for dates. LordJezo Excel Discussion (Misc queries) 1 July 21st 06 06:03 PM
Simple AutoFill Series Question Abode Excel Discussion (Misc queries) 1 March 23rd 06 07:28 AM
simple chart question Shooter Excel Worksheet Functions 1 January 24th 06 09:30 PM
simple chart question Shooter Excel Worksheet Functions 1 July 26th 05 06:48 PM


All times are GMT +1. The time now is 04:09 PM.

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"