help is needed

MERKY

New Member
Joined
Apr 29, 2002
Messages
38
i have cells where the user will input data and then this data will be transferred to another sheet. I would like to do a presence check to make sure that data has been typed into all the cells. The cells i would like to do this check on are
C3,C5,C7,C9 and C11. Is there any way to do this?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
or

Sub CheckValues()
On Error Resume Next


If Range("c3", "c5", "c7", "c9", "c11").Cells.SpecialCells(xlCellTypeBlanks).Activate = False Then
MsgBox "All fields checked for mpty cells - OK to exit", vbInformation + vbOKOnly, "DATABASE CONTROL"
Workbooks("workbookname.xls").Close SaveChanges:=True
Exit Sub
Application.Quit
Else

If Range("c3", "c5", "c7", "c9", "c11").Cells.SpecialCells(xlCellTypeBlanks).Activate = True Then
MsgBox "You must fill in these blank fields", vbCritical + vbOKOnly, "DATABASE CONTROL"
End If
End If


End Sub
This message was edited by brettvba on 2002-04-30 16:16
 
Upvote 0

Forum statistics

Threads
1,215,653
Messages
6,126,046
Members
449,282
Latest member
Glatortue

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top