Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Activating problem

I might have too complicated idea to secure my workbooks but.......

I used to have security macro in each of my workbooks which tested
harddrives serialnumber.
Chancing and adding a computer makes it too hard work to edit all of those
workbooks to add new serials.
So I made an external sec.xls file which do the trick.

1. When a calculation workbook (auto-open macro) is opened it opens sec.xls
in the very same folder where it was started and adds a workbooks name
inside sec.xls to A6 as string, which calls it. So it can come back to
original workbook.
2. According to sec.xls (auto-open macro) calculation it should compare it
calculation workbook is allowed to go on opening.
3. If allowed sec.xls should place "OK" in calculation workbooks H1,
otherwise "NO"

Everything went just fine but I can't activate my workbook which calls
sec.xls.
So OK is placed in sec.xls instead of the original workbook.

Is it ok using that calling workbook as a string in A6?

Any ideas how to solve this or even make it any simplier.
I am not familiar with the public variables if it's any solution.

frombook = Sheets("id").Range("A6").Value
Workbooks(frombook).Activate

This is the line it accepts but won't work as it should.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Activating problem

What do you put in H6?

Do you use just the name of the file or do you include the entire path?
You only want the name--not the path.

Do you include the extension of the file in H6?
Make sure you include the extension.


Jasoni wrote:

I might have too complicated idea to secure my workbooks but.......

I used to have security macro in each of my workbooks which tested
harddrives serialnumber.
Chancing and adding a computer makes it too hard work to edit all of those
workbooks to add new serials.
So I made an external sec.xls file which do the trick.

1. When a calculation workbook (auto-open macro) is opened it opens sec.xls
in the very same folder where it was started and adds a workbooks name
inside sec.xls to A6 as string, which calls it. So it can come back to
original workbook.
2. According to sec.xls (auto-open macro) calculation it should compare it
calculation workbook is allowed to go on opening.
3. If allowed sec.xls should place "OK" in calculation workbooks H1,
otherwise "NO"

Everything went just fine but I can't activate my workbook which calls
sec.xls.
So OK is placed in sec.xls instead of the original workbook.

Is it ok using that calling workbook as a string in A6?

Any ideas how to solve this or even make it any simplier.
I am not familiar with the public variables if it's any solution.

frombook = Sheets("id").Range("A6").Value
Workbooks(frombook).Activate

This is the line it accepts but won't work as it should.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Activating problem

Yes, to both of the questions.
For example there is in a A6: text string "test.xls"


"Dave Peterson" kirjoitti
...
What do you put in H6?

Do you use just the name of the file or do you include the entire path?
You only want the name--not the path.

Do you include the extension of the file in H6?
Make sure you include the extension.


Jasoni wrote:

I might have too complicated idea to secure my workbooks but.......

I used to have security macro in each of my workbooks which tested
harddrives serialnumber.
Chancing and adding a computer makes it too hard work to edit all of
those
workbooks to add new serials.
So I made an external sec.xls file which do the trick.

1. When a calculation workbook (auto-open macro) is opened it opens
sec.xls
in the very same folder where it was started and adds a workbooks name
inside sec.xls to A6 as string, which calls it. So it can come back to
original workbook.
2. According to sec.xls (auto-open macro) calculation it should compare
it
calculation workbook is allowed to go on opening.
3. If allowed sec.xls should place "OK" in calculation workbooks H1,
otherwise "NO"

Everything went just fine but I can't activate my workbook which calls
sec.xls.
So OK is placed in sec.xls instead of the original workbook.

Is it ok using that calling workbook as a string in A6?

Any ideas how to solve this or even make it any simplier.
I am not familiar with the public variables if it's any solution.

frombook = Sheets("id").Range("A6").Value
Workbooks(frombook).Activate

This is the line it accepts but won't work as it should.


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Activating problem

If test.xls isn't open, it'll cause a problem.

And you're positive that it's spelled correctly???


Jasoni wrote:

Yes, to both of the questions.
For example there is in a A6: text string "test.xls"

"Dave Peterson" kirjoitti
...
What do you put in H6?

Do you use just the name of the file or do you include the entire path?
You only want the name--not the path.

Do you include the extension of the file in H6?
Make sure you include the extension.


Jasoni wrote:

I might have too complicated idea to secure my workbooks but.......

I used to have security macro in each of my workbooks which tested
harddrives serialnumber.
Chancing and adding a computer makes it too hard work to edit all of
those
workbooks to add new serials.
So I made an external sec.xls file which do the trick.

1. When a calculation workbook (auto-open macro) is opened it opens
sec.xls
in the very same folder where it was started and adds a workbooks name
inside sec.xls to A6 as string, which calls it. So it can come back to
original workbook.
2. According to sec.xls (auto-open macro) calculation it should compare
it
calculation workbook is allowed to go on opening.
3. If allowed sec.xls should place "OK" in calculation workbooks H1,
otherwise "NO"

Everything went just fine but I can't activate my workbook which calls
sec.xls.
So OK is placed in sec.xls instead of the original workbook.

Is it ok using that calling workbook as a string in A6?

Any ideas how to solve this or even make it any simplier.
I am not familiar with the public variables if it's any solution.

frombook = Sheets("id").Range("A6").Value
Workbooks(frombook).Activate

This is the line it accepts but won't work as it should.


--

Dave Peterson


--

Dave Peterson
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
Activating/De-activating buttons Nash Excel Programming 4 June 22nd 05 07:24 AM
Problem activating OLEObjects Peter Fopma Excel Programming 1 November 9th 04 11:48 AM
Activating Worksheet Controls - "Excel VBA Problem" vinayd Excel Programming 5 June 23rd 04 09:43 AM
Problem activating a sheet jowatkins[_6_] Excel Programming 1 January 19th 04 01:33 PM
Problem in activating a sheet Neeleshwar Thakur Excel Programming 1 December 18th 03 12:43 PM


All times are GMT +1. The time now is 04:28 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"