Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Same variable name in different projects
I have a program that makes a workbook to copy itself without saving it. This workbook has a Global Variable "PWD" to manage the password of a sheet in the workbook. I want to assign a different password for the copy as my program coping itself and lock the sheet with a new password in the new workbook. How do I refer to "PWD" in the new workbook as supposed to the orginal workbook?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Same variable name in different projects
Hi Anson;
One way you can achieve this is to make a hidden worksheet and hold the value for the password in one of the cells. Then reference the value by using the code MyPassword = ThisWorkBook.Sheets("Ini").Range("A1") Where the hiddne sheet is named Ini and the value is in cell A1. Then when the second workbook is crated just change the value in the Ini range A1. Thanks, Greg -----Original Message----- I have a program that makes a workbook to copy itself without saving it. This workbook has a Global Variable "PWD" to manage the password of a sheet in the workbook. I want to assign a different password for the copy as my program coping itself and lock the sheet with a new password in the new workbook. How do I refer to "PWD" in the new workbook as supposed to the orginal workbook? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help with projects | Excel Discussion (Misc queries) | |||
Scheduling Projects | Excel Discussion (Misc queries) | |||
Securing VB Projects? | Excel Programming | |||
All Projects Code | Excel Programming | |||
How to become a better programmer, post college. More projects or less projects. | Excel Programming |