Adding code inside new created workbook sheet vbaRecovering VBA modules from corrupt Excel workbookRun EXCEL...

How can my powered armor quickly replace its ceramic plates?

Why zero tolerance on nudity in space?

Should I reinstall Linux when changing the laptop's CPU?

Difference between i++ and (i)++ in C

use of 4/2 chord more compelling than root position?

How would an AI self awareness kill switch work?

Gear reduction on large turbofans

Odd 74HCT1G125 behaviour

What evolutionary advantage do viruses have in host specificity?

Positioning node within rectangle Tikz

Why is it that Bernie Sanders is always called a "socialist"?

A curious equality of integrals involving the prime counting function?

What is the most fuel efficient way out of the Solar System?

What is the wife of a henpecked husband called?

Dilemma of explaining to interviewer that he is the reason for declining second interview

How do I append a character to the end of every line in an Excel cell?

What are "industrial chops"?

How old is the day of 24 equal hours?

Why did Democrats in the Senate oppose the Born-Alive Abortion Survivors Protection Act (2019 S.130)?

Finding a logistic regression model which can achieve zero error on a training set training data for a binary classification problem with two features

Is using an 'empty' metaphor considered bad style?

Is there a weight limit to Feather Fall?

A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?

Using only 1s, make 29 with the minimum number of digits



Adding code inside new created workbook sheet vba


Recovering VBA modules from corrupt Excel workbookRun EXCEL VBA code in separate workbooks in sequenceVBA code to copy certain sheets from closed workbooks saved in a folder to a brand new workbookHow to save sheet1s of multiple workbooks created into a single workbook having multiple worksheets using VB scripts?I have created a code for RL and is successfully saved in Personal.XLSB. But not able to use it in new workbookExactly position new option button in VBAMacro/VBA Code to List and print names and code of all macros in a workbookIs it possible to run a vba macro inside a vbs script?Fill Series VBA CodeUsing excel 2013 VBA Combine Multiple worksheets into new workbook













0















I have a button that will create a new workbook and save as new. Is it possible to automatically add a code inside the worksheet of the new created workbook? how?



for example I have event code. I want to apply on every workbook that will be created with no need to open the the new workbook and add the code manually. also I want the project to be protected.



is that possible in vba macro?










share|improve this question



























    0















    I have a button that will create a new workbook and save as new. Is it possible to automatically add a code inside the worksheet of the new created workbook? how?



    for example I have event code. I want to apply on every workbook that will be created with no need to open the the new workbook and add the code manually. also I want the project to be protected.



    is that possible in vba macro?










    share|improve this question

























      0












      0








      0








      I have a button that will create a new workbook and save as new. Is it possible to automatically add a code inside the worksheet of the new created workbook? how?



      for example I have event code. I want to apply on every workbook that will be created with no need to open the the new workbook and add the code manually. also I want the project to be protected.



      is that possible in vba macro?










      share|improve this question














      I have a button that will create a new workbook and save as new. Is it possible to automatically add a code inside the worksheet of the new created workbook? how?



      for example I have event code. I want to apply on every workbook that will be created with no need to open the the new workbook and add the code manually. also I want the project to be protected.



      is that possible in vba macro?







      microsoft-excel vba macros






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 11 mins ago









      geegee

      234




      234






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1410083%2fadding-code-inside-new-created-workbook-sheet-vba%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1410083%2fadding-code-inside-new-created-workbook-sheet-vba%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...