ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Possible? (https://www.excelbanter.com/excel-programming/276785-possible.html)

B. Wassen

Possible?
 
Is it possible to hide the cursor?



Ben[_6_]

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?







Tom Ogilvy

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?









B. Wassen

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



Tom Ogilvy

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





Tom Ogilvy

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







B. Wassen

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