Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default "Are you sure" Prompt

Open sheet with certain fields with 0 as the default
values, but if you put $$ in them and later try to over
write them get a "are you sure" prompt.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default "Are you sure" Prompt

Was that a question or a statement?

Is it your desire to achieve this behavior?

Is it your desire to avoid this behavior?

"Dan" wrote:

Open sheet with certain fields with 0 as the default
values, but if you put $$ in them and later try to over
write them get a "are you sure" prompt.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default "Are you sure" Prompt

Worksheet code:

Private blnTrigger As Boolean
Private Const cID = "$$"

Private Sub Worksheet_Change(ByVal Target As Range)
If blnTrigger Then
If MsgBox("Are you sure?", vbOKCancel, "Sure?") = vbCancel Then
Application.EnableEvents = False
Target.Value = cID
Application.EnableEvents = True
End If
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
blnTrigger = (Target.Value = cID)
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Dan" wrote in message
...
Open sheet with certain fields with 0 as the default
values, but if you put $$ in them and later try to over
write them get a "are you sure" prompt.



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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
is it possible to disable "save" prompt in excel file on web server? [email protected] Excel Discussion (Misc queries) 0 May 9th 07 05:58 PM
How to avoid "update links" startup prompt? [email protected] Excel Discussion (Misc queries) 8 July 23rd 06 04:20 AM
The "i" prompt when opening a worksheet containing links Frank W Excel Programming 0 May 4th 04 08:26 PM
How can I get "File Close" to prompt me to "Save Changes" ?? Charles Jordan Excel Programming 4 July 31st 03 04:01 PM


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