View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Shared workbook problem!!!!

Can you select a shape or something else instead?

If you don't have a shape on the sheet you want, the only way I know to stop a
cell from being selected is to stop all selections--but you'll still have an
activecell--but the user won't see the cell outlining.

Option Explicit
Sub auto_open()
Dim wks As Worksheet
Set wks = Worksheets("sheet1")
With wks
.Select
.Protect
.EnableSelection = xlNoSelection
MsgBox ActiveCell.Address
End With
End Sub

I think I'd either just select a cell (A1 is always nice) or one that's way out
of the way.

Option Explicit
Sub auto_open()
Dim wks As Worksheet
Set wks = Worksheets("sheet1")
With wks
Application.ScreenUpdating = False
Application.Goto .Cells(.Cells.Count), scroll:=False
Application.ScreenUpdating = True
End With
End Sub



Simon Lloyd wrote:

Dave,

just tried the Selection.EntireRow.Insert and it worked a treat.

Just one other question........do you know how to get excel to have no
activecell on start up? my other sub does select a cell before the
whole workbook is open but while the sub i posted earlier is running i
dont want excel to have an activecell i have tried ActiveCell = xlNone
but that just cleared the activecell.

any ideas?

Simon

--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=374868


--

Dave Peterson