LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Jim Simpson
 
Posts: n/a
Default

Hi Bob,
Unfortunately I am not as tech-savvy as Wendy, however I think I am trying
to accomplish the same goal as her. I have a simple Excel worksheet that i
need my salesmen to fill out all fields completely before it is submitted. i
thought data validation held the answer, but to no avail. Is it possible for
you to explain (in layman terms) how i can implement the instructions you
gave wendy. if necessary, i can send you a copy of the worksheet on Saturday.

i am new to discussion groups so i don't know how long it takes to get a
response. If you don't mind, reply to both my son's home email
and my business


thanks, Jim

"Bob Phillips" wrote:

Wendy,

It worked in my tests (doesn't it always).

Why don't you send me the workbook and I can see it first hand.

bob dot phillips at tiscali dot co dot uk

do the obvious to the above email

--

HTH

RP
(remove nothere from the email address if mailing direct)


"WendyUK" wrote in message
...
Hi Bob,

I Cut & Pasted your code straight in - it doesn't complain at all - no

errors.

Opened the sheet again but still saves with blank fields. It is bound to

be
me and something stupid I am doing........ but I do thank you for your
wonderful efforts and patience with me.....

WendyUK

"Bob Phillips" wrote:

Sorry Wendy,

Seems I forgot my dots. Try this instead

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)

With Worksheets("Job Card")
If .Range("F1").Value < "" And _
.Range("J1").Value < "" And _
.Range("I4").Value < "" And _
.Range("I6").Value < "" And _
.Range("B2").Value < "" And _
.Range("B7").Value < "" Then
Else
MsgBox "Not all fields completed"
Cancel = True
End If
End With

End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"WendyUK" wrote in message
...
This is a cut & paste of the code - I do not get an error, it just

saves
the
document.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)

With Worksheets("Job Card")
If Range("F1").Value < "" And _
Range("J1").Value < "" And _
Range("I4").Value < "" And _
Range("I6").Value < "" And _
Range("B2").Value < "" And _
Range("B7").Value < "" Then
Else
MsgBox "Not all fields completed"
Cancel = True
End If
End With

End Sub

Regards
WendyUK



"WendyUK" wrote:

Hi

I wish to validate that certain cells have been populated with data

and
prevent the "save" function if these cells are "blank".

Can anyone help?

Thank you,
Wendy









 
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
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Convert data type of cells to Text,Number,Date and Time Kevin Excel Worksheet Functions 1 December 31st 04 12:57 PM
To safety merge cells without data destroyed, and smart unmerge! Kevin Excel Discussion (Misc queries) 0 December 30th 04 07:17 AM
Heps to design Locked/Unlocked cells in protected worksheet Kevin Excel Discussion (Misc queries) 0 December 30th 04 07:09 AM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM


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