Prevent User From Typing On Worksheet?

Feb 11, 2009

I have tables on a spreadsheet and userforms created. Is there anyway to prevent users from just typing on the worksheet so they will have to use the userform?

View 4 Replies


ADVERTISEMENT

Stopping User From Typing In Textbox

Jul 4, 2009

I have a textbox in a user form that I'm using as a way for someone to view what I've written but not for them to write in. Is there a way to easily disable them from writing in the text box?

View 2 Replies View Related

Stop User Typing In A Combobox

May 11, 2007

how to write VBA to stop user typing in a combobox but only choose from the dropdown list?

SO that to avoice any device I/O error.

View 3 Replies View Related

Prevent The User From Saving The Data Input From The User Form If Any Of Those Three Fields Is Left Blank

Feb 9, 2010

I have a user form that has a combo box "City" two text boxes one called "Flight" and the other "Date". What I'm trying to do is to prevent the user from saving the data input from the user form if any of those three fields is left blank. The code that I have so far checks all of the required fields, if any are left blank a message notifys which field(s) is left blank and return the focus back to that field. But the rest of code also fires.

What I really need is either to stop the code if any fields are blank and return the focus back to the blank field, the user completes the field(s) and clicks the save again, or better yet, pause the code until all the required fields are completed and then complete the save. (There is actually another 200+ lines of code in this sub, but I deleted it to keep the post a little shorter.)

View 2 Replies View Related

Protect Some Cells Of A Spreadsheet From User Input (by Typing Only),

Mar 15, 2009

Is there a way to protect some cells of a spreadsheet from user input (by typing only), yet letting button controls and VBA macros modify the values of those cells?

I need to prevent users from accidentally deleting formulas or values generated by VBA macros or controls, although they may delete values in some cells.

View 9 Replies View Related

Prevent User From Accessing The Excel File When It Is In Use By Another User

Jul 22, 2013

An Excel file named CLEARING is availble in thr central server system. it will be accessed by 5 or 6 staffs from some other systems what i need is when one person accesses/edits this file the others should not even able to open in the read only file ,when the file is saved and closed ,then only the next person should access it

View 1 Replies View Related

How To Prevent User Error

Jan 6, 2009

I have a simple spreadsheet which requires a date (mm/dd/yy) in Column A. Columns B-F use formulas to break this date down into the month, quarter, year, etc. Users frequently need to add new rows at the top of the sheet just below the column headers.

To be sure the formulas in Columns B-F are included when adding new rows, I put together a simple macro which copies the top ten rows, inserts them at the top of the sheet, and then clears existing data from the new rows (keeping formulas intact).

I put a button on the sheet to run this macro. However, sometimes users insert new rows without using the macro. This results in no data in Columns B-F for these new rows because the formulas weren’t copied.

How can I prevent this from happening? If I protect the sheet and prevent users from inserting new rows, the macro won’t run. Is there something I can add to the macro that will allow it to run properly while the sheet is protected? Below is the macro code.

Private Sub CommandButton1_Click()
Rows("3:12").Select
Selection.Copy
Rows("3:3").Select
Selection.Insert Shift:=xlDown
Range("A3:A12").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("G3:K12").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("A12").Select
End Sub

View 9 Replies View Related

Prevent A User From Opening Another Workbook

Feb 12, 2009

How can I prevent a user from opening another workbook in an Excel session "from the outside"?

I'm fairly new to VB. I'm developing (in VB 2003) a simple but SECURE Excel environment which will allow a user to update a hidden Master_Records workbook. I need to keep the user's Excel session secure...for example, I've disabled all Excel Toolbars and Command Buttons, effectively preventing the user from doing anything except filling in some cell values and clicking on a few custom buttons in the worksheet. But how can I prevent the user from opening another workbook into the active session from his desktop and introducing some malicious code into the session via that route?

One respondent in another forum (the only one, in fact) suggested that I look into "instantiating workbook level events" so that I can detect when other workbooks are open. I'm not sure what that means, is there someone here who could give me some guidance into that solution?

View 13 Replies View Related

Prevent The User From Scrolling In A Sheet?

May 14, 2007

I have an Excel sheet that displays 50 rows and 20 columns when it is opened the first time. These rows and columns are the only ones that I want the user to be able to see. The user shouldn't be able to navigate the sheet by using the scroll bars or the wheel on the mouse. I have of course already removed the scroll bars but I don't know how to handle the scroll wheel problem.

View 2 Replies View Related

Prevent Formula Being Deleted When Visible To User?

Apr 20, 2013

I am using following code to effect a change which works fine:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Sheets("Closed Flts").Unprotect "abcd"
Sheets("Faults").Unprotect "abcd"

[Code].....

But when the sheet is unprotected to effect this change the formula in cells ( row I and L) are visible to user and can delete them. Or they can even delete the cell itself or modify formula.

The formule in Row I is
Code:
=IF(A12="","",IF(G12=1,A12,IF(G12=2,A12,IF(G12=3,A12+1,IF(G12=4,A12+5,IF(G12=5,A12+28,"priority?"))))))
And in Row L is
Code:
=IF(A13="","",IF(I13

View 1 Replies View Related

VBA Code Prevent A User From Changing Cell Contents

May 26, 2009

Is it possible to write VBA code that will prevent a user from changing a cell's contents, depending on the cell's font color?

More specifically, I have a column of text in range B15:B64. Some of the cells will have a black font, others will be blue. Is it possible to lock the black font cells only, leaving the blue cells unlocked for users to change?

View 9 Replies View Related

How To Prevent User From Clicking On Days In Calendar Control 8.0

Jun 22, 2013

Is there a way to prevent a user from clicking on the days in the Calendar Control 8.0? I am trying to place 12 calendar controls on a worksheet for reference only. I am using a linked cell to reflect what date the Calendar is to display.

View 2 Replies View Related

Prevent User To Enter Duplicate Using Data Validation?

Dec 27, 2013

I want to prevent user from entering duplicate text or numbers in a cell using the Data Validation.

View 9 Replies View Related

Check User Input To Prevent Run-Time Error

Dec 28, 2007

what I want. It relies on an input box asking the user to enter a part code, which when found creates a duplicate copy. However, if the user enters a part that doesn't exist I get a run-time error. Can anybody point me in the right direction so when a user enters an incorrect part they get a message telling them it doesn't exist.

Private Sub SortTest_Click()
Dim s As String
Dim r As Excel. Range

Range("A2").Activate
s = InputBox("Enter the number you wish to find")
If StrPtr(s) = 0 Then
MsgBox "You must enter an existing part number!"
Else
Set r = Cells.Find(What:=s, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)

Range(Cells(r.Row, "A"), Cells(r.Row, "AH")).Copy
Sheets("APL").Cells(r.Row, "A").Insert Shift:=xlDown


Application.CutCopyMode = False
Application.Goto Sheets("APL").Cells(r.Row, "H")
Selection.Offset(-1, -5).ClearContents
Selection.Offset(-1, 0).Select
End If

End Sub

View 7 Replies View Related

Prevent User Seeing Senstive Information In Hidden Rows/Columns

Aug 19, 2008

I have a feeling the answer to this will be 'no' based on the searching I've done, but is it possible to allow formatting of rows/columns on a protected worksheet, yet prevent the user from unhiding some rows/columns I don't want them to see? I've allowed them to format rows/columns so they can "size" them to fit the text they enter, but that has opened up the ability for them to unhide columns. Using Shrink To Fit would be cumbersome due to the number of cells involved.

View 5 Replies View Related

Prevent VBA Functions From Being Available On Worksheet

Jul 9, 2014

I use a few Functions in my VBA code. All these functions, are declared as "Public", and reside in a single module. However, they are called from many different modules during code execution. (i.e. many functions called from many modules - hence the "Public" declaration).

My issue is that in addition to being available to different VBA Modules, these Functions are also available on the worksheet as a UDF (so if a user presses "=" in the formula bar, the auto-complete shows these functions when the first characters match). Is there a way to remove the availability of the function on user worksheet? i.e. to allow a Function to be called from different modules in VBA, but prevent it from being available on the worksheet.

My current work-around is to prefix all Public Function names with letter "j" - as no excel formula seems to begin with it - none of them show up as auto-complete options. Nevertheless, the Functions are still available to the user - which is what I would like to prevent.

View 9 Replies View Related

Prevent Delete Worksheet

Aug 7, 2009

An old post provided the following macros that purportedly prevent users from deleting a worksheet. Unfortunately, it also makes it so you can't delete ANY worksheet in ANY file, which is of course not what was intended. Need figure a way to remove this nuisance? All attempts to delete a sheet keep looking back to the offending workbook, even though the macro has since been deleted from it.

Try pasting the following two event procedures into the Help sheet module:

'==========================>>
Private Sub Worksheet_Activate()
Dim CB As CommandBar
Dim Ctrl As CommandBarControl
For Each CB In Application.CommandBars
Set Ctrl = CB.FindControl(ID:=847, recursive:=True)
If Not Ctrl Is Nothing Then
Ctrl.OnAction = "RefuseToDelete"
Ctrl.State = msoButtonUp
End If
Next
End Sub................

View 4 Replies View Related

VBA - How To Write A Sub To Prevent All Changes To WorkSheet

Feb 28, 2014

How do I write a sub to prevent all changes to a worksheet?

This is part of my thinking in covering all possible mishaps that could occur when working with sheet movement. If I could somehow introduce an active protection on either my Sheets(1) or Sheets("Main"), then I could prevent accidental writing to or removal of said sheet.

View 3 Replies View Related

Prevent Worksheet Protection

Aug 18, 2007

I have a workbook for which I would like to protect the worksheets, while still allowing my code to alter the worksheets, which can be done with the line:

Sheet1.Protect Password="abc" UserInterfaceOnly:=True

However, I want allow some users (who know the password) to be able to unprotect the sheet if they need to edit it, then turn the protection back on after they are done. How can I make sure that they use my macro to protect the sheet with UserInterfaceOnly set to true, rather than the standard way to turn on protection?
That is, is there a way I can prevent the user from being able to protect the sheet with the Tools->Protection->Protect Sheet menu item?

View 2 Replies View Related

Prevent Worksheet Scrolling

Oct 19, 2007

I have an excel sheet embedded in a Powerpoint presentation, but I have the problem that users are editing the sheet and accidently or unknowingly scrolling around. This results in the window resizing itself when the exit the object and messing up the appearance of the presentation. Is there a way of easily preventing scrolling (either via VBA or other)? I can obviously hide the scroll bars but that does not prevent the use of the mouse's scroll-wheel. I have also already hidden all unused columns and rows so that they cannot oversize the window.

View 5 Replies View Related

Prevent Pasting Data Into Worksheet

Aug 3, 2006

I work in a correctional centre. Some of the correctional officers have
little training to use Excel or other programs, but are required to complete
spreadsheets on line. Although we have heavily protected the worksheets and
locked cells, we find that in some cases the staff can still mess up the
worksheets by copying and pasting data inappropriately.

Is there a way to turn off the ability to paste data into the worksheet, and
to force each field to be completed manually? This would eliminate the
problem.

View 14 Replies View Related

Prevent Sorting Of Entire Worksheet

Dec 27, 2006

I have a worksheet thats makes things easier by sorting to users needs. heproblem I have is I have totals in columns p:AJ rows 1:3. How can I prevent the user of sorting the whole worksheet. Most of my users have basic Excell understanding so sorting is usually the whole page. I've tried hiding and protecting the columns but must be doing some thing wrong. I just need them to only be able to sort column A:N. I'm already working on moving totals to a separate sheet to I know this will work but curious for future worksheets.

View 3 Replies View Related

Prevent Referencing Hidden Worksheet

Jun 3, 2008

I have a spreadsheet which I'm using as a log-in front for a series of other workbooks. The usernames and passwords are stored hidden cells within a "very hidden" worksheet. The workbook is protected and VBA code itself is password protected.

In short no-one can directly view the passwords (unless the password to unprotect it all is known.

What I have found is that someone can use a formula to reference the cells containing the user details. "=a1" for example.

Is the a method hiding the contents of a cell from excel itself? I want the vba script to be able to see the value, but any "=a1" formulas to return a blank.

View 8 Replies View Related

Formatting Worksheet: Re-adjust The Worksheet To Make It More User Friendly Based On Number Of Rows In Current Sheet

Oct 14, 2008

I have a worksheet with 30,000 rows. But sometimes even if I have fewer records in this worksheet(lets say 1000) worksheet shows the same 30,000 rows.And its annoying when you try to navigate using vertical scroll bar. Is there any option to re-adjust the worksheet to make it more user friendly based on number of rows in current sheet.

View 2 Replies View Related

Prevent Duplicate Entry From Textbox Into Different Worksheet

Jun 12, 2009

I have a entry form in which i want to register customers. the first field is the customer number (which is unique(created by me) for every customer). This is TextBox 1 in the document. I would like to search for duplicates in worksheet 2, collumn A, when pressing "enter" to move from TextBox 1 to TextBox 2. A search for duplicates should start and a message should appear " duplicate found" if found, otherwise continue to TextBox 2 for further entry of information.

Please see my attached document for clarification.

View 9 Replies View Related

Code To Prevent Editing & Selecting Of Range Worksheet

Sep 3, 2008

I have the following code that Ger Plante very kindly helped me with which, depending on whether there is an 'x' by someone's name in a list, creates a new workbook, copies some information to it and saves it before moving on to the next 'x'. Loop Through Rows & Copy Each Row To New Workbook

For lLoop = 2 To 251 'first row of data to last row.
If ws1.Cells(lLoop, 4).Value = "x" Then '4 = Column D
ws1.Activate
ws1.Range("e" & lLoop & ":g" & lLoop).Copy
ws1.Range("B1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Rng1.Copy
Workbooks.Add
ActiveSheet.Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
ActiveSheet.Range("A1").Select
ActiveSheet.SaveAs varPath & "Student Data Files" & ActiveSheet.Range("B1") & ".xls"
ActiveWorkbook.Close

Else
End If

Next lLoop

how I can modify the code such that any cells in the range "b1:b504" in Sheet1 of the the new workbook can't be selected or edited without a password....I have tried unsuccessfully using Protect but am not sure how to get vba to set it to specific cells and determine exactly what is allowed in those cells.

View 5 Replies View Related

Prevent Worksheet Change Event Causing Chain Reaction

Jan 14, 2008

I'd like the users to be able to change some detail in a couple of places and have it updated throughout the spreadsheet. Basically, the user can change the line name in any of the input sheets and the code changes the sheet name, and searches for the reference to the old name in the overview sheet and changes it accordingly.

The problem I have at the moment is that I would also like the user to be able to change the line name from the overview sheet too... I am having trouble thinking how to have similar code in the "Overview" sheets Worksheet_Change event without getting into a big constant loop... e.g. if the line name is changed via code on the individual input sheets won't that then trigger the first code, which will trigger the second etc. etc. I have the following code in the ThisWorkbook section:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim sName As String
Dim sOldName As String
Application. ScreenUpdating = False
sOldName = ActiveSheet.Name
If Target.Address <> "$B$1" Then Exit Sub
sName = ActiveSheet.Range("B1")
On Error Goto ErrorHandler
ActiveSheet.Name = sName
On Error Goto 0
Sheet8.Select 'this is the overview sheet
Cells. Find(What:=sOldName, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate........................

View 2 Replies View Related

Add New Worksheet & Name As User Specifies

Sep 13, 2007

I'm trying to write a macro attached to a button which will add another sheet to the workbook with a specified name. I'm running into problems when I try and reference this new sheet, since when a sheet is added it's sheet number is not necessarily the next available number. Like if I inserted two sheets, Sheet1 and Sheet2 and deleted one the next sheet I inserted would not be Sheet2 but sheet3. This is causing me some problems in trying to make my code error proof. Here is what I have.

Sub newSheet() ..

View 3 Replies View Related

Populate More Than One Worksheet From A User Form

Oct 19, 2009

I've only just starting using Excel for anything other than basic calculations and have got a little stuck with a user form. On my attached spreadsheet I am trying to set up a form for staff incident reporting. There is a Contents worksheet and then each incident has it's own detailed worksheet. The user will click on 'create new incident' on the Contents page.

This opens a user form. From this form I want to populate the contents worksheet. I then also want it to populate the relevant incident worksheet. I can populate the contents page but I need help getting the correct Incident worksheet populated at the same time. Hopefully all will become clear running the file.

View 5 Replies View Related

Worksheet Protection And User Rights

Aug 11, 2008

I have a worksheet that has been designed to allow the user to enter data, in certain cells of the worksheet are formula to do automatic calculations as the user enters data. Here is my dilemia

a) I need the cells with the formula's to be locked so the user cannot delete or alter them.
b) In cases there may be a case where rows will have to be deleted or inserted, depending on the data entered.
c) The sheet needs to be protected to avoid the user from altering the sheet i.e. design etc.

I have found the problem is that i can lock out all the cells that i do not want the user to alter, and i can protect the worksheet and allow users to have certain edit right. But the problem i am facing is that when you have locked or protected cells on a wprksheet and you protect the sheet, then you can not delete or insert rows.

Is there a way that allows the sheet and formula to be locked, but also allow the user to delete or insert rows if they need.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved