Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Prevent Saving command if data is not validad

Im trying to force the users to enter the correct format of the data needed,
ive found a way to prevent the save command, but i have not been able to
validate first. Id apreciate some help on this subject.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Prevent Saving command if data is not validad

It will take a little more information that you have provided to make any
useful suggestions.

"HugoLTote" wrote:

Im trying to force the users to enter the correct format of the data needed,
ive found a way to prevent the save command, but i have not been able to
validate first. Id apreciate some help on this subject.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Prevent Saving command if data is not validad

There is a event named BeforeSave in the Thisworkbook module that you can use

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Trim(Sheets("sheet1").Range("A1").Value) = "" Then Cancel = True
End Sub

This example check if there is somethin in cell A1 of "Sheet1"

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"HugoLTote" wrote in message ...
Im trying to force the users to enter the correct format of the data needed,
ive found a way to prevent the save command, but i have not been able to
validate first. Id apreciate some help on this subject.

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
Prevent saving and allow only through Macro Lester from AUS Excel Discussion (Misc queries) 2 March 14th 07 02:39 PM
Prevent Saving muniz Excel Discussion (Misc queries) 0 February 15th 07 04:26 PM
Prevent Saving From Web jb_tenor1 Excel Programming 1 September 13th 06 04:35 AM
prevent saving a worksheet looking4help Excel Discussion (Misc queries) 2 March 17th 05 10:14 PM
Macro to prevent saving stols121 Excel Programming 2 February 24th 04 05:50 PM


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