Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Dynamically Activating Cells

Hi,

I have this code in the "ThisWorkbook" section...

Private Sub Workbook_Open()
Worksheets("Main").ScrollArea = "H8:H172"
End Sub

Now what I want to be able to do is to not let Range("H9") be usable until
Range("H8") is filled in. Then Subsiquently each other following cell
depending on the previous cell.

Is this possible or is it a lost cause? I've asked some friends but so far
nobody has been able to help with this.

Thanks Much In Advance.
Rob
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Dynamically Activating Cells

I think I'd do this with a worksheet change event. Maybe something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myColumn As Range

Set myColumn = Columns(1)
If Not Intersect(Target, myColumn) Is Nothing Then
Target.Parent.Unprotect
lrow = Cells(Rows.Count, Target.Column).End(xlUp).Row
With Cells(lrow + 1, Target.Column)
.Locked = False
.Select
End With
Target.Parent.Protect
End If
End Sub

"Rob" wrote:

Hi,

I have this code in the "ThisWorkbook" section...

Private Sub Workbook_Open()
Worksheets("Main").ScrollArea = "H8:H172"
End Sub

Now what I want to be able to do is to not let Range("H9") be usable until
Range("H8") is filled in. Then Subsiquently each other following cell
depending on the previous cell.

Is this possible or is it a lost cause? I've asked some friends but so far
nobody has been able to help with this.

Thanks Much In Advance.
Rob

  #3   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Dynamically Activating Cells

Thanks so much for the reply. I tried the code and it certainly locks the
cells but when I input information in the home cell (H8) it doesn't unlock
cell H9 so that I can put information into it next.

Any Ideas or did I do something wrong?

Thanks Sooo Very Much!
Rob

"Barb Reinhardt" wrote:

I think I'd do this with a worksheet change event. Maybe something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myColumn As Range

Set myColumn = Columns(1)
If Not Intersect(Target, myColumn) Is Nothing Then
Target.Parent.Unprotect
lrow = Cells(Rows.Count, Target.Column).End(xlUp).Row
With Cells(lrow + 1, Target.Column)
.Locked = False
.Select
End With
Target.Parent.Protect
End If
End Sub

"Rob" wrote:

Hi,

I have this code in the "ThisWorkbook" section...

Private Sub Workbook_Open()
Worksheets("Main").ScrollArea = "H8:H172"
End Sub

Now what I want to be able to do is to not let Range("H9") be usable until
Range("H8") is filled in. Then Subsiquently each other following cell
depending on the previous cell.

Is this possible or is it a lost cause? I've asked some friends but so far
nobody has been able to help with this.

Thanks Much In Advance.
Rob

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Dynamically Activating Cells

Change

Set myColumn = Columns(8)

Let me know how that works.

"Rob" wrote:

Thanks so much for the reply. I tried the code and it certainly locks the
cells but when I input information in the home cell (H8) it doesn't unlock
cell H9 so that I can put information into it next.

Any Ideas or did I do something wrong?

Thanks Sooo Very Much!
Rob

"Barb Reinhardt" wrote:

I think I'd do this with a worksheet change event. Maybe something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myColumn As Range

Set myColumn = Columns(1)
If Not Intersect(Target, myColumn) Is Nothing Then
Target.Parent.Unprotect
lrow = Cells(Rows.Count, Target.Column).End(xlUp).Row
With Cells(lrow + 1, Target.Column)
.Locked = False
.Select
End With
Target.Parent.Protect
End If
End Sub

"Rob" wrote:

Hi,

I have this code in the "ThisWorkbook" section...

Private Sub Workbook_Open()
Worksheets("Main").ScrollArea = "H8:H172"
End Sub

Now what I want to be able to do is to not let Range("H9") be usable until
Range("H8") is filled in. Then Subsiquently each other following cell
depending on the previous cell.

Is this possible or is it a lost cause? I've asked some friends but so far
nobody has been able to help with this.

Thanks Much In Advance.
Rob

  #5   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Dynamically Activating Cells

AWESOME It Works!!!

Thanks sooo much!!!

"Barb Reinhardt" wrote:

Change

Set myColumn = Columns(8)

Let me know how that works.

"Rob" wrote:

Thanks so much for the reply. I tried the code and it certainly locks the
cells but when I input information in the home cell (H8) it doesn't unlock
cell H9 so that I can put information into it next.

Any Ideas or did I do something wrong?

Thanks Sooo Very Much!
Rob

"Barb Reinhardt" wrote:

I think I'd do this with a worksheet change event. Maybe something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myColumn As Range

Set myColumn = Columns(1)
If Not Intersect(Target, myColumn) Is Nothing Then
Target.Parent.Unprotect
lrow = Cells(Rows.Count, Target.Column).End(xlUp).Row
With Cells(lrow + 1, Target.Column)
.Locked = False
.Select
End With
Target.Parent.Protect
End If
End Sub

"Rob" wrote:

Hi,

I have this code in the "ThisWorkbook" section...

Private Sub Workbook_Open()
Worksheets("Main").ScrollArea = "H8:H172"
End Sub

Now what I want to be able to do is to not let Range("H9") be usable until
Range("H8") is filled in. Then Subsiquently each other following cell
depending on the previous cell.

Is this possible or is it a lost cause? I've asked some friends but so far
nobody has been able to help with this.

Thanks Much In Advance.
Rob



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Dynamically Activating Cells

Rob

Change Set myColumn = Columns(1) to Columns(8)


Gord Dibben MS Excel MVP

On Tue, 5 Jun 2007 07:24:01 -0700, Rob wrote:

Thanks so much for the reply. I tried the code and it certainly locks the
cells but when I input information in the home cell (H8) it doesn't unlock
cell H9 so that I can put information into it next.

Any Ideas or did I do something wrong?

Thanks Sooo Very Much!
Rob

"Barb Reinhardt" wrote:

I think I'd do this with a worksheet change event. Maybe something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myColumn As Range

Set myColumn = Columns(1)
If Not Intersect(Target, myColumn) Is Nothing Then
Target.Parent.Unprotect
lrow = Cells(Rows.Count, Target.Column).End(xlUp).Row
With Cells(lrow + 1, Target.Column)
.Locked = False
.Select
End With
Target.Parent.Protect
End If
End Sub

"Rob" wrote:

Hi,

I have this code in the "ThisWorkbook" section...

Private Sub Workbook_Open()
Worksheets("Main").ScrollArea = "H8:H172"
End Sub

Now what I want to be able to do is to not let Range("H9") be usable until
Range("H8") is filled in. Then Subsiquently each other following cell
depending on the previous cell.

Is this possible or is it a lost cause? I've asked some friends but so far
nobody has been able to help with this.

Thanks Much In Advance.
Rob


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception in Activating Subscription Cells Ostate Excel Discussion (Misc queries) 1 May 22nd 07 07:38 AM
Exception in Activating Subscription cells Ostate Excel Discussion (Misc queries) 0 May 19th 07 05:56 PM
How to reference cells dynamically ArthurN Excel Discussion (Misc queries) 2 February 23rd 06 10:08 AM
Locking cells dynamically Yossi Excel Discussion (Misc queries) 1 April 15th 05 01:53 PM
Row height is not adjusting after activating Merge Cells & Wrap Te MHPDallas Excel Worksheet Functions 1 April 9th 05 12:32 AM


All times are GMT +1. The time now is 09:49 AM.

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"