![]() |
Possible?
Is it possible to hide the cursor?
|
Possible?
Tom,
it works great! :) Thanks. But is it also possible to run it in a macro, and each time excel is started the macro automaticly runs? Another question..... I have a form in wich the user must fill data. For instance in A1, A2, A3, F7 Is it possible that after input from A3 to jump to F7? Ben Tom Ogilvy schreef in berichtnieuws ... Lock all cells (Format=Cells=Protection tab) Protect the sheet (Tools=Protect=Worksheet) change the EnableSelection Property of the worksheet to xlNoSelection. this property will need to be set each time the workbook is opened. -- Regards, Tom Ogilvy B. Wassen wrote in message ... Is it possible to hide the cursor? |
Possible?
Use the Workbook_Open event. You go into the vbe and right click on the
thisworkbook entry in your project in the project explorer, selecting view code. In the resulting module, select Workbook from the left dropdown at the top and Open from the left one. Private Sub Workbook_Open() End Sub Put your code in this procedure or call it from this procedure. If you want to allow the user to make entries, lock all cells but the ones where the entries will be made - those should be unlocked. Then protect the sheet. for the sheet, set EnableSelection = xlUnlockedCells But, this will allow the curor to be shown - you can't have it both ways. -- Regards, Tom Ogilvy "Ben" wrote in message ... Tom, it works great! :) Thanks. But is it also possible to run it in a macro, and each time excel is started the macro automaticly runs? Another question..... I have a form in wich the user must fill data. For instance in A1, A2, A3, F7 Is it possible that after input from A3 to jump to F7? Ben Tom Ogilvy schreef in berichtnieuws ... Lock all cells (Format=Cells=Protection tab) Protect the sheet (Tools=Protect=Worksheet) change the EnableSelection Property of the worksheet to xlNoSelection. this property will need to be set each time the workbook is opened. -- Regards, Tom Ogilvy B. Wassen wrote in message ... Is it possible to hide the cursor? |
Possible?
Tom,
It looks like this right now : Private Sub Workbook_Open() Selection.Locked = True Selection.FormulaHidden = True ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub But when I open Excel it gives an error at Selection.Locked = True Ben |
Possible?
Private Sub Workbook_Open()
Worksheets("Sheet1").Activate worksheets("Sheet1").Cells .Locked = True .FormulaHidden = True .Protect DrawingObjects:=True, _ Contents:=True, Scenarios:=True .Parent.EnableSelection = xlNoSelection End With End Sub -- Regards, Tom Ogilvy B. Wassen wrote in message ... Tom, It looks like this right now : Private Sub Workbook_Open() Selection.Locked = True Selection.FormulaHidden = True ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub But when I open Excel it gives an error at Selection.Locked = True Ben |
Possible?
Left out the With statement
Private Sub Workbook_Open() Worksheets("Sheet1").Activate With worksheets("Sheet1").Cells .Locked = True .FormulaHidden = True .Protect DrawingObjects:=True, _ Contents:=True, Scenarios:=True .Parent.EnableSelection = xlNoSelection End With End Sub -- Regards, Tom Ogilvy Tom Ogilvy wrote in message ... Private Sub Workbook_Open() Worksheets("Sheet1").Activate worksheets("Sheet1").Cells .Locked = True .FormulaHidden = True .Protect DrawingObjects:=True, _ Contents:=True, Scenarios:=True .Parent.EnableSelection = xlNoSelection End With End Sub -- Regards, Tom Ogilvy B. Wassen wrote in message ... Tom, It looks like this right now : Private Sub Workbook_Open() Selection.Locked = True Selection.FormulaHidden = True ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub But when I open Excel it gives an error at Selection.Locked = True Ben |
Possible?
Tom,
it's strange? But it doesn't work with that code. But when I only have the following, Private Sub Workbook_Open() .Parent.EnableSelection = xlNoSelection End Sub it works fine :) So thanks anyway Ben |
All times are GMT +1. The time now is 09:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com