View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
mark mark is offline
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

.