Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default How do I require data entry in a cell before moving to the next ce

I'm feeling really frustrated here, but can someone help me with requiring a
user to enter data in a cell before they can leave the cell?

I have a drop down box for the cell, and have unchecked 'ignore blank' in
the data validation, but I can still move past the cell without picking
something from the list.

I need to be able to force the user to fill in specific cells in the row,
from drop down boxes, as they move across the worksheet. If they do not
choose from the drop-down box, I need the cursor to stay in that cell and
force them to choose.

Can I do that in Excel?

Warning: My VBA skills are really, really bad.........

thanks - Cindy Butler

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default How do I require data entry in a cell before moving to the next ce

Put the following line in a standard module:

Public checkit As Boolean

Put the following worksheet event macro in the worksheet code area:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set b9 = Range("B9")
Set t = Target
If Intersect(t, b9) Is Nothing Then
If checkit Then
If b9.Value = "" Then
Application.EnableEvents = False
b9.Select
Application.EnableEvents = True
Else
checkit = False
End If
End If
Else
checkit = True
End If
End Sub

This is just an example using cell B9. Once he user has clicked on B9, data
must be entered. If the user tries to move away from B9 without entering
data, they are moved back to B9.


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

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

To learn more about Event Macros (worksheet code), see:

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



--
Gary''s Student - gsnu200775


"CindyB" wrote:

I'm feeling really frustrated here, but can someone help me with requiring a
user to enter data in a cell before they can leave the cell?

I have a drop down box for the cell, and have unchecked 'ignore blank' in
the data validation, but I can still move past the cell without picking
something from the list.

I need to be able to force the user to fill in specific cells in the row,
from drop down boxes, as they move across the worksheet. If they do not
choose from the drop-down box, I need the cursor to stay in that cell and
force them to choose.

Can I do that in Excel?

Warning: My VBA skills are really, really bad.........

thanks - Cindy Butler

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default How do I require data entry in a cell before moving to the nex

Gary - Thank you!!

I have this code in now and am testing it, however I know it won't work
until I do that standard module thing. But I don't know what that means.

Can you be a little more specific about the following statements:
"Put the following line in a standard module:

"Public checkit As Boolean

What is a standard module and how to I get there?

Thanks!!

Cindy Butler


"Gary''s Student" wrote:

Put the following line in a standard module:

Public checkit As Boolean

Put the following worksheet event macro in the worksheet code area:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set b9 = Range("B9")
Set t = Target
If Intersect(t, b9) Is Nothing Then
If checkit Then
If b9.Value = "" Then
Application.EnableEvents = False
b9.Select
Application.EnableEvents = True
Else
checkit = False
End If
End If
Else
checkit = True
End If
End Sub

This is just an example using cell B9. Once he user has clicked on B9, data
must be entered. If the user tries to move away from B9 without entering
data, they are moved back to B9.


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

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

To learn more about Event Macros (worksheet code), see:

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



--
Gary''s Student - gsnu200775


"CindyB" wrote:

I'm feeling really frustrated here, but can someone help me with requiring a
user to enter data in a cell before they can leave the cell?

I have a drop down box for the cell, and have unchecked 'ignore blank' in
the data validation, but I can still move past the cell without picking
something from the list.

I need to be able to force the user to fill in specific cells in the row,
from drop down boxes, as they move across the worksheet. If they do not
choose from the drop-down box, I need the cursor to stay in that cell and
force them to choose.

Can I do that in Excel?

Warning: My VBA skills are really, really bad.........

thanks - Cindy Butler

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 31
Default How do I require data entry in a cell before moving to the nex

On Mar 27, 10:58*am, CindyB wrote:
Gary - Thank you!!

I have this code in now and am testing it, however I know it won't work
until I do that standard module thing. But I don't know what that means.

Can you be a little more specific about the following statements:
"Put the following line in a standard module:

"Public checkit As Boolean

What is a standard module and how to I get there?

Thanks!!

Cindy Butler



"Gary''s Student" wrote:
Put the following line in a standard module:


Public checkit As Boolean


Put the following worksheet event macro in the worksheet code area:


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set b9 = Range("B9")
Set t = Target
If Intersect(t, b9) Is Nothing Then
* * If checkit Then
* * * * If b9.Value = "" Then
* * * * * * Application.EnableEvents = False
* * * * * * b9.Select
* * * * * * Application.EnableEvents = True
* * * * Else
* * * * * * checkit = False
* * * * End If
* * End If
Else
* * checkit = True
End If
End Sub


This is just an example using cell B9. *Once he user has clicked on B9,data
must be entered. *If the user tries to move away from B9 without entering
data, they are moved back to B9.


Because it is worksheet code, it is very easy to install and use:


1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window


If you save the workbook, the macro will be saved with it.


To remove the macro:


1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window


To learn more about macros in general, see:


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


To learn more about Event Macros (worksheet code), see:


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


--
Gary''s Student - gsnu200775


"CindyB" wrote:


I'm feeling really frustrated here, but can someone help me with requiring a
user to enterdatain a cell before they can leave the cell?


I have a drop down box for the cell, and have unchecked 'ignoreblank' in
thedatavalidation, but I can still move past the cell without picking
something from the list.


I need to be able to force the user to fill in specific cells in the row,
from drop down boxes, *as they move across the worksheet. If they do not
choose from the drop-down box, I need the cursor to stay in that cell and
force them to choose.


Can I do that inExcel?


Warning: My VBA skills are really, really bad.........


thanks - Cindy Butler- Hide quoted text -


- Show quoted text -


This is something I've been looking all over for, but I have a really
stupid question. How do I update the code so that it knows to check
the entire column, not just cell B9?
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
Require specific cell entry before saving file Patrick Riley Excel Discussion (Misc queries) 1 March 21st 08 04:46 PM
Require specific cell entry before saving file Patrick Riley Excel Discussion (Misc queries) 2 March 20th 08 03:50 PM
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing [email protected] Excel Discussion (Misc queries) 0 March 20th 08 12:45 PM
Cell Entry That Locks Selected Cells From Any Data Entry. ron Excel Worksheet Functions 5 February 16th 07 09:52 PM
Require alpha-numeric entry Dana Excel Worksheet Functions 3 September 7th 05 07:53 AM


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