Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2004

Tip: Looking for answers? Try searching our database.

Validating Excel Cells

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
B.M.Srinivasa - 28 Sep 2004 13:11 GMT
How to validate the Cells in MS Excel, so that when the
cells are blank the sheet should not save and should warn
for inserting charectors/numbers
JE McGimpsey - 28 Sep 2004 13:54 GMT
one way:

Put something like this in the ThisWorkbook code module:

   Private Sub Workbook_BeforeSave( _
               ByVal SaveAsUI As Boolean, Cancel As Boolean)
       If Application.CountA(Sheets(1).Range("A1,B2,C3")) <> 3 Then
           Cancel = True
           MsgBox "You must have entries in A1, B2, and C3 in Sheet1"
       End If
   End Sub

If you're not familiar with macros, see

   http://www.mvps.org/dmcritchie/excel/getstarted.htm

> How to validate the Cells in MS Excel, so that when the
> cells are blank the sheet should not save and should warn
> for inserting charectors/numbers
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.