Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Opening and Closing workbooks

Hi All

I currently have a problem with a program I have (well
that's why we write here now)

What happens is one workbook opens another workbook and
then the original workbook is closed. However when I do
this because the code originated in the original workbook
as soon as it is closed I get an object-defined error.
That is to say the code can not continue to execute as I
have removed the root macro that is running the operation.

Does anyone know how to get around this?

Thanks in advance
Jase
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Opening and Closing workbooks

Jase,
Store your macros in the personal.xls, this workbook is created when you
choose 'store in personal' option when first storing a recorded macro. It
is opened when Excel opens but remains hidden. You see edit it in the VBA
project window.

This is OK if you personally are running it. If however you are providing
it to others on a different PCs then you might consider creating it as an
add-in (xla extension) and distriubte this to others.

In any case you must ensure that your macro references the correct workbook.

Cheers
Nigel


"Jase" wrote in message
...
Hi All

I currently have a problem with a program I have (well
that's why we write here now)

What happens is one workbook opens another workbook and
then the original workbook is closed. However when I do
this because the code originated in the original workbook
as soon as it is closed I get an object-defined error.
That is to say the code can not continue to execute as I
have removed the root macro that is running the operation.

Does anyone know how to get around this?

Thanks in advance
Jase





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
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
Closing workbooks w/o closing Excel Barb in MD Excel Discussion (Misc queries) 3 February 15th 10 06:42 PM
Disabling formula recalculation when opening or closing workbooks Joe Excel Discussion (Misc queries) 3 August 5th 08 09:24 PM
Slow Opening & Odd Closing ohsix New Users to Excel 1 May 20th 07 05:28 PM
Closing a workbook upon opening another Dave New Users to Excel 3 January 3rd 07 09:57 PM
Closing workbooks through macro Shane Coughlan Excel Programming 1 October 7th 03 04:21 PM


All times are GMT +1. The time now is 01:19 AM.

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

About Us

"It's about Microsoft Excel"