Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Data validation on print - need code

I need a way to initiate data validation when the user tries to prin
the document.

E.g., cell R1C1 requires input. If user tries to print document
message box appears and tells them to fill in this cell first.

TI

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Data validation on print - need code

seeker < wrote:

I need a way to initiate data validation when the user tries to print
the document.

E.g., cell R1C1 requires input. If user tries to print document,
message box appears and tells them to fill in this cell first.


There is a Before Print event in the workbook.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If Range("A1")="" Then
Msgbox "You must fill A1 first"
Cancel = True
End If
End Sub

This code of course must be placed in the Workbook module.
Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Data validation on print - need code

Thank you, just what I needed!


---
Message posted from http://www.ExcelForum.com/

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
custom data validation on cells with data validation values AKrobbins Excel Worksheet Functions 2 June 21st 11 04:20 PM
Code to find data validation in a cell DaveO[_2_] Excel Discussion (Misc queries) 1 March 19th 07 05:53 PM
Validation code for macro to run [email protected] Excel Discussion (Misc queries) 1 December 9th 05 02:28 PM
Data validation code Gareth[_3_] Excel Programming 0 November 26th 03 06:01 PM
Data validation using code Gareth[_3_] Excel Programming 1 November 26th 03 12:27 AM


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