Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
example: (refer help5.xls)
when I select "ctmr" from the validation list, excel does NOT autofill "attn" and "tel". what's wrong with the sub procedures? if the hyperlink does not work, TYPE(NOT CLICK) this url DIRECTLY IN THE BROWSER : http://www.geocities.com/remember_it/help5.xls -------------------------------------------------- Option Explicit Dim rNo As Integer, cNo As Integer Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False rNo = Target.Row cNo = Target.Column If rNo = 3 And cNo = 6 Then fndCtmr End If End Sub Private Sub fndCtmr() Dim rCtmr As Integer Application.EnableEvents = False Cells(5, 6) = "" 'cls present ctmr info Cells(7, 6) = "" rCtmr = 2 'start of ctmr record Do Until Cells(rCtmr, 1) = Empty 'do until the end of ctmr list If Cells(rCtmr, 1) = Cells(3, 6) Then 'if fnd ctmr Exit Do End If rCtmr = rCtmr + 1 'chk next record in db Loop Cells(5, 6) = Cells(rCtmr, 2) 'fill attn Cells(7, 6) = Cells(rCtmr, 3) 'fill tel Application.EnableEvents = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Separating sub procedures | Excel Discussion (Misc queries) | |||
VBA function Procedures.... | Excel Worksheet Functions | |||
VBA functions and Procedures.... | Excel Worksheet Functions | |||
VBA -- procedures as arguments? | Excel Programming | |||
Splitting Procedures | Excel Programming |