#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Possible?

Is it possible to hide the cursor?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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?








  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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


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



All times are GMT +1. The time now is 08:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"