Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
How do I stop "Private Subs" in "ThisWorkbook" on opening from executing.
Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
Hi Ronbo,
I think you ned to give a little more detail. For example, when do you want to prevent execution and why? Are there any other salient factors? --- Regards, Norman "Ronbo" wrote in message ... How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
"Norman Jones" wrote: Hi Ronbo, I think you ned to give a little more detail. For example, when do you want to prevent execution and why? Are there any other salient factors? --- Regards, Norman "Ronbo" wrote in message ... How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. Thanks Norman 1) I loved your response. 2) I appreciated your questions. 3) I was just getting ready to update my post by adding that if you do not enable macros, you are done. Where do we go from here? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
What exactly is the question? Your addition doesn't answer Norman's
questions IMO. The only event that fires on opening is workbook open. You cannot stop that except by disabling macros, with the effect that no macros run. If you want to stop a user from having access to your workbook if they disable macros, you cannot, but you can take some mitigating action. -- HTH ------- Bob Phillips "Ronbo" wrote in message ... "Norman Jones" wrote: Hi Ronbo, I think you ned to give a little more detail. For example, when do you want to prevent execution and why? Are there any other salient factors? --- Regards, Norman "Ronbo" wrote in message ... How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. Thanks Norman 1) I loved your response. 2) I appreciated your questions. 3) I was just getting ready to update my post by adding that if you do not enable macros, you are done. Where do we go from here? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
Bob,
That's what he said. If he disables macros it stops the code from executing. So he was saying he found the answer himself. -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... What exactly is the question? Your addition doesn't answer Norman's questions IMO. The only event that fires on opening is workbook open. You cannot stop that except by disabling macros, with the effect that no macros run. If you want to stop a user from having access to your workbook if they disable macros, you cannot, but you can take some mitigating action. -- HTH ------- Bob Phillips "Ronbo" wrote in message ... "Norman Jones" wrote: Hi Ronbo, I think you ned to give a little more detail. For example, when do you want to prevent execution and why? Are there any other salient factors? --- Regards, Norman "Ronbo" wrote in message ... How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. Thanks Norman 1) I loved your response. 2) I appreciated your questions. 3) I was just getting ready to update my post by adding that if you do not enable macros, you are done. Where do we go from here? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
Hi Tom,
I read it that way too, but he ended with .... Where do we go from here? That is where I got confused. Bob "Tom Ogilvy" wrote in message .. . Bob, That's what he said. If he disables macros it stops the code from executing. So he was saying he found the answer himself. -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... What exactly is the question? Your addition doesn't answer Norman's questions IMO. The only event that fires on opening is workbook open. You cannot stop that except by disabling macros, with the effect that no macros run. If you want to stop a user from having access to your workbook if they disable macros, you cannot, but you can take some mitigating action. -- HTH ------- Bob Phillips "Ronbo" wrote in message ... "Norman Jones" wrote: Hi Ronbo, I think you ned to give a little more detail. For example, when do you want to prevent execution and why? Are there any other salient factors? --- Regards, Norman "Ronbo" wrote in message ... How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. Thanks Norman 1) I loved your response. 2) I appreciated your questions. 3) I was just getting ready to update my post by adding that if you do not enable macros, you are done. Where do we go from here? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
Based on the whole thread, I would say he was just being cute. Of course,
that is just my opinion. -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... Hi Tom, I read it that way too, but he ended with ... Where do we go from here? That is where I got confused. Bob "Tom Ogilvy" wrote in message .. . Bob, That's what he said. If he disables macros it stops the code from executing. So he was saying he found the answer himself. -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... What exactly is the question? Your addition doesn't answer Norman's questions IMO. The only event that fires on opening is workbook open. You cannot stop that except by disabling macros, with the effect that no macros run. If you want to stop a user from having access to your workbook if they disable macros, you cannot, but you can take some mitigating action. -- HTH ------- Bob Phillips "Ronbo" wrote in message ... "Norman Jones" wrote: Hi Ronbo, I think you ned to give a little more detail. For example, when do you want to prevent execution and why? Are there any other salient factors? --- Regards, Norman "Ronbo" wrote in message ... How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. Thanks Norman 1) I loved your response. 2) I appreciated your questions. 3) I was just getting ready to update my post by adding that if you do not enable macros, you are done. Where do we go from here? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
"Tom Ogilvy" wrote: Based on the whole thread, I would say he was just being cute. Of course, that is just my opinion. -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... Hi Tom, I read it that way too, but he ended with ... Where do we go from here? That is where I got confused. Bob "Tom Ogilvy" wrote in message .. . Bob, That's what he said. If he disables macros it stops the code from executing. So he was saying he found the answer himself. -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... What exactly is the question? Your addition doesn't answer Norman's questions IMO. The only event that fires on opening is workbook open. You cannot stop that except by disabling macros, with the effect that no macros run. If you want to stop a user from having access to your workbook if they disable macros, you cannot, but you can take some mitigating action. -- HTH ------- Bob Phillips "Ronbo" wrote in message ... "Norman Jones" wrote: Hi Ronbo, I think you ned to give a little more detail. For example, when do you want to prevent execution and why? Are there any other salient factors? --- Regards, Norman "Ronbo" wrote in message ... How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. Thanks Norman 1) I loved your response. 2) I appreciated your questions. 3) I was just getting ready to update my post by adding that if you do not enable macros, you are done. Where do we go from here? First of all, let me state that what I am trying to do is protect my work. I know that this is not possible, but I am trying to make it as difficult as possible. Through the help of this discussion group and individuals such as Tom and Bob, I believe that I have created a workbook that would be very difficult to obtain the formulas or code from (hopefully impossible, as a newbie I think it is). Since the worksheet is run/protected by routines I do not want to let someone open it without macros running - by "Disable Macros" upon opening. Thomas Ramel provided me a round about way to prevent one from opening w/o macros with an addin procedure in Private Sub Workbook_Open. It works great. If one clicks "Disable Macros" it stops. They are done. However last night when trying to break into it (and I have no idea how to do it) I did something that let me get into the workbook without enabling macros. I do not know what I did but it seems to me that the workbook opened without executing the code in "Private Sub Workbook_Open". Thus my question; How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. I liked Norms response because I read it to question my intent with, "why and are there any other salient (silent) factors". To many times I see someone asking how to break into or bypass protection and someone here provides answers. I believe that If someone wants to bypass protection, let them figure it out on their own or better yet take it to their programming professionals who can verify ownership and use their skills to open the workbook. As alway, thanks for your help and help in the past. |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
You can prevents events from occurring at startup by holding down
the SHIFT key when you open the workbook. Another way is to set Application.EnableEvents = False before opening the workbook. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Ronbo" wrote in message ... "Tom Ogilvy" wrote: Based on the whole thread, I would say he was just being cute. Of course, that is just my opinion. -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... Hi Tom, I read it that way too, but he ended with ... Where do we go from here? That is where I got confused. Bob "Tom Ogilvy" wrote in message .. . Bob, That's what he said. If he disables macros it stops the code from executing. So he was saying he found the answer himself. -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... What exactly is the question? Your addition doesn't answer Norman's questions IMO. The only event that fires on opening is workbook open. You cannot stop that except by disabling macros, with the effect that no macros run. If you want to stop a user from having access to your workbook if they disable macros, you cannot, but you can take some mitigating action. -- HTH ------- Bob Phillips "Ronbo" wrote in message ... "Norman Jones" wrote: Hi Ronbo, I think you ned to give a little more detail. For example, when do you want to prevent execution and why? Are there any other salient factors? --- Regards, Norman "Ronbo" wrote in message ... How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. Thanks Norman 1) I loved your response. 2) I appreciated your questions. 3) I was just getting ready to update my post by adding that if you do not enable macros, you are done. Where do we go from here? First of all, let me state that what I am trying to do is protect my work. I know that this is not possible, but I am trying to make it as difficult as possible. Through the help of this discussion group and individuals such as Tom and Bob, I believe that I have created a workbook that would be very difficult to obtain the formulas or code from (hopefully impossible, as a newbie I think it is). Since the worksheet is run/protected by routines I do not want to let someone open it without macros running - by "Disable Macros" upon opening. Thomas Ramel provided me a round about way to prevent one from opening w/o macros with an addin procedure in Private Sub Workbook_Open. It works great. If one clicks "Disable Macros" it stops. They are done. However last night when trying to break into it (and I have no idea how to do it) I did something that let me get into the workbook without enabling macros. I do not know what I did but it seems to me that the workbook opened without executing the code in "Private Sub Workbook_Open". Thus my question; How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. I liked Norms response because I read it to question my intent with, "why and are there any other salient (silent) factors". To many times I see someone asking how to break into or bypass protection and someone here provides answers. I believe that If someone wants to bypass protection, let them figure it out on their own or better yet take it to their programming professionals who can verify ownership and use their skills to open the workbook. As alway, thanks for your help and help in the past. |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
I believe that If someone wants to bypass protection, let them figure it out on their own or better yet take it to their programming professionals who can verify ownership and use their skills to open the workbook. The problem is that the cat is already out of the bag. Excel's security is weak, and there is enough information out in the public domain such that it doesn't take much research to find out how to crack it. |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
"Chip Pearson" wrote: You can prevents events from occurring at startup by holding down the SHIFT key when you open the workbook. Another way is to set Application.EnableEvents = False before opening the workbook. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Ronbo" wrote in message ... "Tom Ogilvy" wrote: Based on the whole thread, I would say he was just being cute. Of course, that is just my opinion. -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... Hi Tom, I read it that way too, but he ended with ... Where do we go from here? That is where I got confused. Bob "Tom Ogilvy" wrote in message .. . Bob, That's what he said. If he disables macros it stops the code from executing. So he was saying he found the answer himself. -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... What exactly is the question? Your addition doesn't answer Norman's questions IMO. The only event that fires on opening is workbook open. You cannot stop that except by disabling macros, with the effect that no macros run. If you want to stop a user from having access to your workbook if they disable macros, you cannot, but you can take some mitigating action. -- HTH ------- Bob Phillips "Ronbo" wrote in message ... "Norman Jones" wrote: Hi Ronbo, I think you ned to give a little more detail. For example, when do you want to prevent execution and why? Are there any other salient factors? --- Regards, Norman "Ronbo" wrote in message ... How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. Thanks Norman 1) I loved your response. 2) I appreciated your questions. 3) I was just getting ready to update my post by adding that if you do not enable macros, you are done. Where do we go from here? First of all, let me state that what I am trying to do is protect my work. I know that this is not possible, but I am trying to make it as difficult as possible. Through the help of this discussion group and individuals such as Tom and Bob, I believe that I have created a workbook that would be very difficult to obtain the formulas or code from (hopefully impossible, as a newbie I think it is). Since the worksheet is run/protected by routines I do not want to let someone open it without macros running - by "Disable Macros" upon opening. Thomas Ramel provided me a round about way to prevent one from opening w/o macros with an addin procedure in Private Sub Workbook_Open. It works great. If one clicks "Disable Macros" it stops. They are done. However last night when trying to break into it (and I have no idea how to do it) I did something that let me get into the workbook without enabling macros. I do not know what I did but it seems to me that the workbook opened without executing the code in "Private Sub Workbook_Open". Thus my question; How do I stop "Private Subs" in "ThisWorkbook" on opening from executing. I liked Norms response because I read it to question my intent with, "why and are there any other salient (silent) factors". To many times I see someone asking how to break into or bypass protection and someone here provides answers. I believe that If someone wants to bypass protection, let them figure it out on their own or better yet take it to their programming professionals who can verify ownership and use their skills to open the workbook. As alway, thanks for your help and help in the past. Chip: Thanks for the suggestions. I maybe doing something wrong but I could not get either to work. Which is of course what I want. When holding down the SHIFT key when opening the workbook I get the error message "Can not open Excel Add-in for Editing. Please Edit the Source Doc Instead." Holding down the SHIFT key and clicking OK returns the error message 4 times. Then the "Enable/Disable Macro" dialog box appears. Holding down the SHIFT key and clicking "Disable" returns the error message for 2 times and then stops trying to open the workbook. This is what I want to happen(not opening) from the code in "Private Sub Workbook_Open" I then opened a workbook and invoked "Application.EnableEvents = False. Then I tried to open my protected workbook without macros and it did what I want it to do, it stopped. If you/anyone has any idea what I am doing wrong (hopefully nothing) I would be interested. Otherwise I think I have wasted enough time on what must of been a fluk last night. Bob: I know its out there and easy to find. Its just my opinion that it should not be made easier. Thanks to all. Ronbo |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
Private Sub
Hi Ronbo,
I liked Norms response because I read it to question my intent with, "why and are there any other salient (silent) factors". Just for the record, I intentionally used "Salient" rather than your interpreted silent. I used salient in its dictionary defined sense: standing out conspicuously, noticeable or striking: particularly noticeable or important, striking, or relevant --- Regards, Norman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Private Sub() - Sub() | Excel Discussion (Misc queries) | |||
Private sub problem | Excel Worksheet Functions | |||
Private sub | New Users to Excel | |||
Private subs | Excel Programming | |||
Problem with private sub | Excel Programming |