View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Finding and Activating the first blank cell

Mike,
Just to clarify Peter's response:
You only need to set the Worksheet ScrollArea when the file is opened, as it
is not saved with the file.
So in the ThisWorkbook module:
Private Sub Workbook_Open()
Worksheets(1).ScrollArea = "A1:G1000"
End Sub

NickHK

wrote in message
ups.com...
Hi there,
I've never done any Visual Basic programming (only C) and have been
browsing this group for a while. I need to find a way to do two
things:
1. Set the scrollable area for a worksheet when it's reopened (I have
accomplished this by using
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Sheet1.ScrollArea = "a1:g5000"
End Sub
I found this on another usenet post and edited it fit my application.
I'm not sure why it is being done every time the selection is changed
but it seems to be working which makes me happy.

2. Now the part I'm stuck on. I need to make it so that when the
user opens the worksheet the active cell will be the first blank one in
the scrollable area. I've seen several other posts, but yet to find a
definitive solution for someone on my... newbiness level.

Thanks for your help!
Mike