Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to create a routine to fill the remaining cells in a row with pre-set
values based on the change in contents (value) of a given row in column "A". In the overall scheme of things, where does this routine reside and what are best practices to follow. Thanking you in advance. Helmut |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A10" '<=== change to suit On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target 'do your stuff End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Helmut" wrote in message ... I need to create a routine to fill the remaining cells in a row with pre-set values based on the change in contents (value) of a given row in column "A". In the overall scheme of things, where does this routine reside and what are best practices to follow. Thanking you in advance. Helmut |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob, Thank you. Helmut
"Bob Phillips" wrote: Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "A10" '<=== change to suit On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target 'do your stuff End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Helmut" wrote in message ... I need to create a routine to fill the remaining cells in a row with pre-set values based on the change in contents (value) of a given row in column "A". In the overall scheme of things, where does this routine reside and what are best practices to follow. Thanking you in advance. Helmut |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create Pivot Table Data with Column "Sum" rather than "count" defa | Excel Discussion (Misc queries) | |||
How do I change the column heading in Excel to display "A" "B" "C | New Users to Excel | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
create links to check boxes marked "good" fair"and "bad" | Excel Worksheet Functions | |||
=IF(D13="PAID","YES","NO") Can I change fonts colour | Excel Discussion (Misc queries) |