Re: Excel function for tables

From: Jonathan Rynd (pqaf4hm02_at_atsneakemail.com.invalid)
Date: 02/14/04


Date: Sat, 14 Feb 2004 03:13:19 GMT


=?Utf-8?B?cmJyb3dubGVl?= <anonymous@discussions.microsoft.com> wrote in
news:A0D61BEA-1CEF-4D7F-BE9F-3A2A89077591@microsoft.com:

> Yes, that is correct.
> Just so that I can practice explaining myself.....
> We want to activate the cell (or highlight the entire row if that is
> easier) on the travel form . We will then switch over to the mileage
> chart. On the mileage chart we will click on the cell containing the
> numeric value of the mileage.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim c As Integer
    Dim r As Long
    If Target.Count > 1 Then Exit Sub
    c = Target.Column
    r = Target.Row
    If c < 2 Or c > 13 Or r < 3 Or r > 14 Then Exit Sub
    with activeworkbook.Sheets("Travel Form")
        .Cells(ActiveSheet.Row,6) = Target.Value
        .Cells(ActiveSheet.Row,3) = Cells(2, c).Value
        .Cells(ActiveSheet.Row,2) = Cells(r, 1).Value
    end with
End Sub

-- 
My email address has an extra @ (spell it out) and an extra invalid. 
Please remove them if you are not a spammer or list broker and want to 
reply.


Relevant Pages

  • Re: How to capture Max cell value (High Water Mark)
    ... Where A1 is the cell that is changing and the HiWater function can be in any ... I don't have any other macros in the workbook. ... Sub Test_Enable_Events ... I'm only using it on the same worksheet where the macro was created. ...
    (microsoft.public.excel)
  • Re: How to capture Max cell value (High Water Mark)
    ... directly addressing the changing cell. ... I don't have any other macros in the workbook. ... Sub Test_Enable_Events ... "Note that it only works with the worksheet under which it was ...
    (microsoft.public.excel)
  • Info Only: Formula Freeze Module
    ... Dim rngTest As Range ... .ScreenUpdating = False ... Public Sub RecordDelete ... Dim cell As Object ...
    (microsoft.public.excel.programming)
  • Re: start programing
    ... This should open the Visual Basic Editor. ... Visual Basic automatically will create an "End Sub". ... program to set the font attributes, borders and color of the cell. ... Macro Recorder, select the cell, set Bold, heavy border outline ...
    (comp.programming)
  • Re: macro call
    ... cell and training the user to click the button to invoke the code. ... Private Sub Worksheet_Change ... Dim iSect As Range ... it will call Macro22. ...
    (microsoft.public.excel.misc)