Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with projects Mike Excel Discussion (Misc queries) 0 February 10th 07 10:51 AM
Scheduling Projects Skip2Maloo Excel Discussion (Misc queries) 1 July 27th 06 08:44 PM
Securing VB Projects? Jeffrey Marcellus Excel Programming 1 May 19th 04 07:25 PM
All Projects Code Todd Huttenstine Excel Programming 3 May 1st 04 01:44 AM
How to become a better programmer, post college. More projects or less projects. Matt Somers Excel Programming 1 February 12th 04 01:54 PM


All times are GMT +1. The time now is 02:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"