![]() |
Copy worksheet values and formats into another workbook
I am very new to VBA programming.
I have a worksheet (called €śForm99€ť) that is populated by data entries placed on another worksheet (called €śData Entry€ť), both in the same workbook. Data is entered throughout a month. At the end of the month the Form99 is printed. After the hard copy is secured a button is clicked which clears all the data from the data entry worksheet (macro), this in turn naturally clears the values that had been placed in the Form99 What I would like to do is capture the values and formats of the Form99 worksheet and copy them into a new worksheet in a different workbook. For instance, copy the January Form99 data into a new worksheet in a workbook called €śAchieve€ť. At the end of February copy the February Form99 data into a new worksheet in that same €śAchieve€ť workbook. At the end of the year I would have an achieve workbook with a single worksheet for every month of the year. I have been successful doing this using a macro which is triggered by a button in my Data Entry worksheet. The problem I have is that my worksheets are protected and I cant execute the macro past the €śEnter Password€ť window that pops up. I can enter the password but then I have to manually set it again. I dont want to give out the password. Is there another way to accomplish my goal? Is there a way to get over the password problem? Thank you in advance for your help. -- Rick |
Copy worksheet values and formats into another workbook
Rick,
Search VBA help for "unprotect" and look at its example. Also look at "protect" from the "See Also". When you get the hang of it you may also want to lock the module with a password. Bob L. "Rick_Wendt" wrote in message ... I am very new to VBA programming. I have a worksheet (called "Form99") that is populated by data entries placed on another worksheet (called "Data Entry"), both in the same workbook. Data is entered throughout a month. At the end of the month the Form99 is printed. After the hard copy is secured a button is clicked which clears all the data from the data entry worksheet (macro), this in turn naturally clears the values that had been placed in the Form99 What I would like to do is capture the values and formats of the Form99 worksheet and copy them into a new worksheet in a different workbook. For instance, copy the January Form99 data into a new worksheet in a workbook called "Achieve". At the end of February copy the February Form99 data into a new worksheet in that same "Achieve" workbook. At the end of the year I would have an achieve workbook with a single worksheet for every month of the year. I have been successful doing this using a macro which is triggered by a button in my Data Entry worksheet. The problem I have is that my worksheets are protected and I can't execute the macro past the "Enter Password" window that pops up. I can enter the password but then I have to manually set it again. I don't want to give out the password. Is there another way to accomplish my goal? Is there a way to get over the password problem? Thank you in advance for your help. -- Rick |
All times are GMT +1. The time now is 01:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com