LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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



 
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 12:33 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"