Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 90
Default how do I make a cell required to have input?

I have a spreadsheet that I want to require the user to add input before
going to the next cells. Does anyone have any idea how to do this?

thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default how do I make a cell required to have input?

1. press ALT+F11 to go VBA window
2. in Project-VBA Project window double click on the name of your
worksheet
3. go slightly to the right where you should see (General) inscription
and click on it
4. you should be able to select "Worksheet" and so do it
5. copy/paste the following code there


Private Sub Worksheet_Activate()

start:
If Len([a1]) = 0 And Now() [Sheet2!a1] Then ins = InputBox("Before
going to other cells in this worksheet insert value into cell A1 or
otherwise you will not be able to continue", "Insert value")

[a1] = ins
[Sheet2!a1]=Now()

If Len([a1]) = 0 Then GoTo start

End Sub


the macro does the following:
1. checks whether A1 in Sheet1 is empty
2. if so it checks cell A1 in Sheet2 where time and date of last
change to cell A1 in Sheet1 was made
3. if present time/date than time/date of last change macro shows an
Inputbox where the user is required to insert data
4. if the user does not insert the data before pressing OK and cell A1
in Sheet1 is still empty then Inputbox shows again (until sth. is
inserted)

it would be the best if Sheet2 was made xlVeryHidden so that the user
cannot reveal time/date of last change

if you wish I may send you a file with this macro. write me to





On 29 Kwi, 17:29, Michele wrote:
I have a spreadsheet that I want to require the user to add input before
going to the next cells. Does anyone have any idea how to do this?

thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default how do I make a cell required to have input?

Hi,
use data validation

"Michele" wrote:

I have a spreadsheet that I want to require the user to add input before
going to the next cells. Does anyone have any idea how to do this?

thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default how do I make a cell required to have input?

If you force the user to input something then you can expect a lot of junk to
be entered. Generally speaking a better option is to flag the cell in an
obvious way such that the user is aware of the requirement. Use formulas,
conditional formatting and data validation for that. You can also use some
code to prompt the user to make the input at some point (like switching
sheets) that the input is required.

--
HTH...

Jim Thomlinson


"Michele" wrote:

I have a spreadsheet that I want to require the user to add input before
going to the next cells. Does anyone have any idea how to do this?

thanks

  #5   Report Post  
Junior Member
 
Posts: 1
Default

Quote:
Originally Posted by Jarek Kujawa[_2_] View Post
1. press ALT+F11 to go VBA window
2. in Project-VBA Project window double click on the name of your
worksheet
3. go slightly to the right where you should see (General) inscription
and click on it
4. you should be able to select "Worksheet" and so do it
5. copy/paste the following code there


Private Sub Worksheet_Activate()

start:
If Len([a1]) = 0 And Now() [Sheet2!a1] Then ins = InputBox("Before
going to other cells in this worksheet insert value into cell A1 or
otherwise you will not be able to continue", "Insert value")

[a1] = ins
[Sheet2!a1]=Now()

If Len([a1]) = 0 Then GoTo start

End Sub


the macro does the following:
1. checks whether A1 in Sheet1 is empty
2. if so it checks cell A1 in Sheet2 where time and date of last
change to cell A1 in Sheet1 was made
3. if present time/date than time/date of last change macro shows an
Inputbox where the user is required to insert data
4. if the user does not insert the data before pressing OK and cell A1
in Sheet1 is still empty then Inputbox shows again (until sth. is
inserted)

it would be the best if Sheet2 was made xlVeryHidden so that the user
cannot reveal time/date of last change

if you wish I may send you a file with this macro. write me to





On 29 Kwi, 17:29, Michele wrote:
I have a spreadsheet that I want to require the user to add input before
going to the next cells. Does anyone have any idea how to do this?

thanks
Hi-
A coworker & I have searched the internet and keep finding solutions like this but nothing seems to work for either of us. We are both people who usually can figure things out. It's very frustrating boarding on funny because we keep failing.

Might you know of a reason why we are still unable to do this? I copied & pasted your code (as well as other type codes from other boards)Any help is greatly appreciated. Thanks!!
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
is it possible to make a cell in excel as entry required max power Excel Discussion (Misc queries) 1 November 8th 06 01:27 PM
can you make a cell value required? nishapurohit Excel Discussion (Misc queries) 2 January 30th 06 11:42 PM
how to make a cell required in excel ncaurora03 Excel Discussion (Misc queries) 1 January 30th 06 06:11 PM
How do I make a cell required to edit in Excell? Belinda Excel Discussion (Misc queries) 1 November 4th 05 04:43 PM
how do I make a cell in Excel required to be populated? Tia Excel Discussion (Misc queries) 1 February 10th 05 12:35 AM


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