Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Disallow cell data entry which autopopulates


I have a macro which autopopulates a date/time stamp (lets say,cell B1)
when a selection is chosen in (A1). This time stamp can be changed and
I don't want anyone to be able to change it. I want to make the cell
where the user can click the cell, but when they try to type, nothing
happens.

Thanks,




--
jackel
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 897
Default Disallow cell data entry which autopopulates

You didn't say what Excel version you are using. In Excel 2003, you
would lock the cells you want to protect, and unlock the ones you want
the user to edit. Then you would protect the worksheet in the
Workbook_Open event, with additional code to allow only macros to make
changes to the locked cells.

1. Select cells you don't want to be changed (i.e. B1), press Ctrl-1,
go to Protection tab, check "Locked" and "Hidden"
2. Select cells you want to allow editing, press Ctrl-1, go to
Protection tab, UNcheck "Locked" and "Hidden"
3. Go to ToolsProtectionProtect SheetOK.

Now all the cells you marked in step 2 will be editable, while the
ones you selected in step 1 will be uneditable (and the formulas will
be hidden as well).

This code, placed in the ThisWorkbook module, will protect your sheets
and allow your update macro to run on the locked cells. See
http://www.rondebruin.nl/code.htm for implementation help.

Private Sub Workbook_Open()
Dim ws As Excel.Worksheet
For Each ws In Worksheets
ws.Protect Password:="mypassword", UserInterFaceOnly:=True
Next ws
End Sub


HTH,
JP


On Feb 19, 1:57*pm, jackel
wrote:
I have a macro which autopopulates a date/time stamp (lets say,cell B1)
when a selection is chosen in (A1). This time stamp can be changed and
I don't want anyone to be able to change it. I want to make the cell
where the user can click the cell, but when they try to type, nothing
happens.

Thanks,

--
jackel


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 897
Default Disallow cell data entry which autopopulates

Err, obviously you would not manually protect the sheet if you are
doing so via code. Please ignore step 3.

On Feb 19, 3:21*pm, JP wrote:
You didn't say what Excel version you are using. In Excel 2003, you
would lock the cells you want to protect, and unlock the ones you want
the user to edit. Then you would protect the worksheet in the
Workbook_Open event, with additional code to allow only macros to make
changes to the locked cells.

1. Select cells you don't want to be changed (i.e. B1), press Ctrl-1,
go to Protection tab, check "Locked" and "Hidden"
2. Select cells you want to allow editing, press Ctrl-1, go to
Protection tab, UNcheck "Locked" and "Hidden"
3. Go to ToolsProtectionProtect SheetOK.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Disallow cell data entry which autopopulates


'JP[_5_ Wrote:
;2635396']You didn't say what Excel version you are using. In Excel
2003, you
would lock the cells you want to protect, and unlock the ones you want
the user to edit. Then you would protect the worksheet in the
Workbook_Open event, with additional code to allow only macros to make
changes to the locked cells.

1. Select cells you don't want to be changed (i.e. B1), press Ctrl-1,
go to Protection tab, check "Locked" and "Hidden"
2. Select cells you want to allow editing, press Ctrl-1, go to
Protection tab, UNcheck "Locked" and "Hidden"
3. Go to ToolsProtectionProtect SheetOK.

Now all the cells you marked in step 2 will be editable, while the
ones you selected in step 1 will be uneditable (and the formulas will
be hidden as well).

This code, placed in the ThisWorkbook module, will protect your sheets
and allow your update macro to run on the locked cells. See
http://www.rondebruin.nl/code.htm for implementation help.

Private Sub Workbook_Open()
Dim ws As Excel.Worksheet
For Each ws In Worksheets
ws.Protect Password:="mypassword", UserInterFaceOnly:=True
Next ws
End Sub


HTH,
JP


On Feb 19, 1:57*pm, jackel
wrote:-
I have a macro which autopopulates a date/time stamp (lets say,cell
B1)
when a selection is chosen in (A1). This time stamp can be changed
and
I don't want anyone to be able to change it. I want to make the cell
where the user can click the cell, but when they try to type, nothing
happens.

Thanks,

--
jackel-

I am using 2003, After I finished with everything and saw the auto
stamp could be edited, I would protect the shared work book and the
code was not able to be viewed. When unprotected, I right click on the
first page to work on the code.

I will try inserting the code you showed me and see how it works, I do
keep the auto stamp cells locked. Then when I protect the book the auto
stamp won't work, I wil let you know either way when everything is
good.

Thanks for the help!




--
jackel
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 897
Default Disallow cell data entry which autopopulates

If you protect the worksheet via code with the "userinterfaceonly"
property, the macro should still be able to update the locked cell.
Let us know!

--JP

On Feb 19, 6:08*pm, jackel
wrote:

I am using 2003, After I finished with everything and saw the auto
stamp could be edited, I would protect the shared work book and the
code was not able to be viewed. When unprotected, I right click on the
first page to work on the code.

I will try inserting the code you showed me and see how it works, I do
keep the auto stamp cells locked. Then when I protect the book the auto
stamp won't work, I wil let you know either way when everything is
good.

Thanks for the help!

--

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
Cell Entry That Locks Selected Cells From Any Data Entry. ron Excel Worksheet Functions 5 February 16th 07 09:52 PM
How do I get data validation to disallow specific entries a-one-and-a-two Excel Worksheet Functions 10 January 5th 07 10:52 PM
Data entry - Copy contents of cell typed in one cell to another ce danie Excel Worksheet Functions 2 March 16th 06 06:51 PM
Disallow cell entries hopeace Excel Discussion (Misc queries) 3 October 14th 05 12:19 AM
In Excel, how can I tell the program to disallow duplicate data i. gthawkster Excel Worksheet Functions 5 December 15th 04 04:42 AM


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