Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Click event to run only once


HI there,

small problem........i was hoping that once the code ran...that was it.
Prob is, when the file is saved, closed and then open again, the code
can run once more. I will run only once when clicked on un-saved file
but i want to prevent a user from running the code more than once
permanently. Can someone help???

Cheers!!!


--
gavmer
------------------------------------------------------------------------
gavmer's Profile: http://www.excelforum.com/member.php...fo&userid=6662
View this thread: http://www.excelforum.com/showthread...hreadid=264970

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 196
Default Click event to run only once

Gidday,

In a general module


dim mintNumNuts as integer
sub Auto-Open()
mintNumNuts=0
end sub




In the routine to save,

before save option

if mintNumNuts<0 then
msgbox "This workbook can not be saved",vbcritical
activeworkbook.close false
exit sub
end if

mintNumNuts=1




regards
mark









-Mark
-----Original Message-----

HI there,

small problem........i was hoping that once the code

ran...that was it.
Prob is, when the file is saved, closed and then open

again, the code
can run once more. I will run only once when clicked on

un-saved file
but i want to prevent a user from running the code more

than once
permanently. Can someone help???

Cheers!!!


--
gavmer
----------------------------------------------------------

--------------
gavmer's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=6662
View this thread:

http://www.excelforum.com/showthread...hreadid=264970

.

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
Click event to run only once gavmer[_91_] Excel Programming 0 October 7th 04 12:07 AM
Click event to run only once gavmer[_83_] Excel Programming 0 October 1st 04 01:24 AM
Click event to run only once gavmer[_82_] Excel Programming 1 September 30th 04 12:42 PM
On Click Event?, and how to use Wandering Mage Excel Programming 5 June 7th 04 04:28 PM
Click Event Nichevo Excel Programming 2 December 4th 03 04:31 AM


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