Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default check input in cells

Hi expert,

I have an application that runs in a userform.
The user can click a button and then returns to Excel where he can put in up
to 1000 records of data (employees of a copany with their data, date of birth,
salary etc.)

How can i make sure that the user fills out all the nescessary cells ?
If the user puts in a line i need to check if the cells in column B,C,E,F and
G are filled in.
if one of the cells is not filled in, the application gives an error message
and is closed without saving.

I would rather have the program givean error message stating that the data
that is filled in the cells is not complete.

Is there a way to check this ?
Thanks,
Pierre

--
Message posted via http://www.officekb.com
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default check input in cells

Let's say you are dealing with row i. Try something link:


If IsEmpty(Cells(i, 2)) Or IsEmpty(Cells(i, 3)) Or IsEmpty(Cells(i, 5)) Or
IsEmpty(Cells(i, 6)) Or IsEmpty(Cells(i, 7)) Then
MsgBox ("Please complete input")
End If
End Sub

Where the if is all in one line.

--
Gary''s Student


"Pierre via OfficeKB.com" wrote:

Hi expert,

I have an application that runs in a userform.
The user can click a button and then returns to Excel where he can put in up
to 1000 records of data (employees of a copany with their data, date of birth,
salary etc.)

How can i make sure that the user fills out all the nescessary cells ?
If the user puts in a line i need to check if the cells in column B,C,E,F and
G are filled in.
if one of the cells is not filled in, the application gives an error message
and is closed without saving.

I would rather have the program givean error message stating that the data
that is filled in the cells is not complete.

Is there a way to check this ?
Thanks,
Pierre

--
Message posted via http://www.officekb.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
Input box data check Mark[_8_] Excel Discussion (Misc queries) 5 January 2nd 09 09:47 PM
How to use Check Box input in a cell's fomula? WentBlank Excel Worksheet Functions 1 June 29th 07 01:22 AM
Check input is a date stumac Excel Discussion (Misc queries) 5 December 14th 06 03:28 PM
Check on the input in an inputbox Tempy Excel Programming 5 May 17th 05 02:01 PM
Check on the input in an inputbox Les Stout Excel Programming 2 January 14th 04 03:18 PM


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