LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting Cancel = True in WorkbookBeforePrint

A problem occurs when running some data validation checks
in the WorkbookBeforePrint Event.

If checks throw up erroneous data I set Cancel = True (to
cancel the print) and my code jumps to the point in the
wookbook where the error occurs.

If the error is on the activeworksheet everything is
fine, however if the error is on another sheet,
attempting to activate it and the cell where the error is
causes Excel to present the hourglass cursor and nothing
seems to happen (although the sheet is displayed).
Clicking in this sheet causes cursor to move in a random
fashion. To correct this the user must click another
sheet or window and return to the sheet containing the
error - the cursor then behaves normally.

Also the cell address textbox in toolbar gives a cell
reference corresponding to where the user was when he
tried to print i.e. the cell in the original worksheet.
It is as if the program thinks it is still on the orginal
worksheet (although the error sheet was activated
properly and is now displayed).

Any solution to this problem would be greatly appreciated.

Tony
PS I am using XP SP2
 
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
Workbook_BeforeClose(Cancel As Boolean) - Cancel won't work gpmichal Setting up and Configuration of Excel 1 May 12th 09 02:33 AM
Search for 2 true arguments and return true or false David Excel Discussion (Misc queries) 3 July 15th 06 10:18 AM
Function to return True/False if all are validated as True by ISNU Tetsuya Oguma Excel Worksheet Functions 2 March 15th 06 10:28 AM
How do I stop Excel from changing the word true to TRUE? Schmyerlou Excel Discussion (Misc queries) 1 November 23rd 05 08:54 PM
error with setting "Items.Visible = True" Stan R Excel Programming 1 August 20th 03 09:51 AM


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