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 If page does not exist

I have a small piece of code in an Excel sheet which validates whether a
field has been completed and then allow a print if it has been. Here's the
code:

Private Sub CheckPrint_Click()
If Worksheets("Checks").Range("D33").Value = "No" Then
ActiveSheet.PrintOut
Else
MsgBox "There is an error on form - check all required fields (marked in
red) have been completed properly and try again"
End If
End Sub

- Problem is, users are saving a copy of the main sheet (SOS) and then
printing - hence they get an error as the macro cannot complete if they only
save the SOS worksheet (the Checks sheet is hidden). Is there a way of
telling Excel that if the page does not exist, carry on to complete the task
(printing) anyway?
 
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
Exist or Not. ldiaz Excel Discussion (Misc queries) 3 September 6th 06 09:31 PM
Am I Looking For Something That Doesn't Exist? seanryann Excel Discussion (Misc queries) 11 April 1st 06 06:10 PM
BLANK EXCEL PAGE STILL EXIST AFTER I CLOSE OUT SPREADSHEET? still learning New Users to Excel 2 May 22nd 05 11:50 AM
count how often a name exist hans Excel Worksheet Functions 4 January 27th 05 02:44 PM
Does worksheet exist Robert S Excel Programming 3 May 18th 04 07:59 PM


All times are GMT +1. The time now is 10:31 PM.

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"