ISTEXT function

J

jmorgs

I am trying to make it so that the worksheet will not allow you to leav
a certain cell blank. I am trying to do it with a custom settings i
Data-Validation using ISTEXT but it is not working. Anyone have
better idea
 
F

Frank Kabel

Hi
you could for example put the following code in your workbook module
(not in a standard module):
Private Sub Workbook_BeforeClose(Cancel As Boolean)
if me.worksheets("sheet1").range("A1")="" then
msgbox "Cell A1 is empty. Fill it"
cancel=true
end if

End Sub
 
J

jmorgs

Hi,
The code makes sense to me (I have experienc with Microsoft Acces
code), but now the problem is figuring out where to put it and when i
will work.
I have tried using anotehr sheet and inserting this code, but with cel
A1 blank, no matter where I click it won't give me the message. I pu
the code in Micorsoft Script Editor. Do you know what I'm doin
wrong?
THANK YOU SO MUCH
 
D

Dave Peterson

I like to just format an adjacent cell in big, bold, red letters:

=if(a1<>"","","<--- Please fill in this cell!")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top