Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Enable Outlining / Workbook_Open / Auto_Open

I am using a piece of code in ThisWorkbook module to enable outlining on selected password protected sheets. I'm confident that the code does what it's supposed to when it's within a Workbook_Open sub but I am encountering other difficulties. If I save the Excel workbook with a different name, or take a copy of it, when I open the differently titled file, I get the following error and Excel ultimately crashes:

"Sorry, we couldn't find [original filepath\filename]. Is it possible it was moved, renamed or deleted?"

If I use Auto_Open instead of Workbook_Open I don't get this error but I am finding other difficulties with Auto_Open and think that Workbook_Open should be the right sub to use.

There are no links in the Excel file and also no reference to the filename in any of the VBA code. The error/crashing occurs whether the file is saved on a network drive or a desktop and also occurs on other users' computers, not just my own.

I've searched lots of forums and haven't found any reports of the same issue, any suggestions gratefully received.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Enable Outlining / Workbook_Open / Auto_Open

I am using a piece of code in ThisWorkbook module to enable outlining on
selected password protected sheets. I'm confident that the code does
what it's supposed to when it's within a Workbook_Open sub but I am
encountering other difficulties. If I save the Excel workbook with a
different name, or take a copy of it, when I open the differently titled
file, I get the following error and Excel ultimately crashes:

"Sorry, we couldn't find [original filepath\filename]. Is it possible
it was moved, renamed or deleted?"

If I use Auto_Open instead of Workbook_Open I don't get this error but I
am finding other difficulties with Auto_Open and think that
Workbook_Open should be the right sub to use.

There are no links in the Excel file and also no reference to the
filename in any of the VBA code. The error/crashing occurs whether the
file is saved on a network drive or a desktop and also occurs on other
users' computers, not just my own.

I've searched lots of forums and haven't found any reports of the same
issue, any suggestions gratefully received.


1. There could very well be links that you're not aware of if your project
uses global (workbook level) defined names.

2. Instead of using Workbook_Open or Workbook_BeforeClose,
use the Auto_Open and Auto_Close optional subs for startup and shutdown
processes.

3. With 'runtime' protected sheets, it may prove more efficient to have the
protection re-applied at startup so any non-persistent protection
properties get reset at startup.

4. Show your code and/or post a link where we can download your file to have
a look at it!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
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
Enable outlining in a protected worksheet johnb Excel Discussion (Misc queries) 8 October 12th 07 08:15 PM
Auto_open OR Workbook_open Baapi Excel Programming 2 November 15th 06 03:39 PM
Protection and Enable Outlining Vlado Sveda Excel Programming 2 January 25th 06 03:19 PM
Auto_Open Workbook_Open [email protected] Excel Programming 4 November 2nd 05 08:20 PM
Auto_Open and Workbook_Open Erich Neuwirth Excel Programming 1 July 14th 04 01:19 AM


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