Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Print Preview Causes Crash

Off'97
I have a VBA macro that calculates values from several sheets and and
updates a summary sheet (basically a template but is left as an "XLS" for a
variety of reasons). On the summary sheet there is a command button that
calls a routine to create a new workbook and copy some selected sheets as
well as the summary sheet to that book.
Because I wanted to remove the button from the copied summary sheet I did it
by

NewBk.Worksheets("Summary").Shapes("cbSaveStmnt"). Select
Selection.Cut

Immediately after this code I save the new workbook with a new name (Year
and month).

All is well, except, if I do a print preview on the displayed summary sheet
(the last sheet copied) Xl goes "boom" and tells me it was referencing a
memory location that couldn't be read.

I played with it and found that if I selected another sheet in the same book
and immediately re-selected the summary it was ok on a preview.
Further, if I rem'd out the button cut statement it was ok.

Incidentally (or maybe not so incidental), the whole project was created
between Off 2000 and '97. It will be installed on a '97 m/c.

I can't seem to duplicate the problem on 2000 (is there some sort of
conflict between the two versions?)

Any ideas?

--
Regards;
Rob

Please reply to the NG.
I'm already up to my eyeballs in
Nigerian/South African get rich
letters as well as "Microsoft Critical Updates" et al.


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
Plot Area Automatically Expands in Print and Print Preview Myk D. Charts and Charting in Excel 2 March 12th 09 01:41 PM
Print and Print Preview Graphic Moving Resizing 2007/2003 Adam Rayburn Excel Discussion (Misc queries) 0 April 4th 07 04:18 PM
print preview v page break preview SamB Excel Discussion (Misc queries) 0 November 16th 06 05:09 PM
Excel Crash wehn print to PDF [email protected] Excel Discussion (Misc queries) 0 May 18th 06 05:53 PM
cell borders that I create dont show on print preview or print scott3435 Excel Discussion (Misc queries) 2 April 6th 06 02:37 AM


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