LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Rick - Column Offset Update

Hi Rick Sorry to start a new thread, but just realised, the code only works
if I change the value in A1 and then
press enter, It does not work with a DDE link that updates every second.

"Rick Rothstein" wrote:

Try this worksheet event code...

Private Sub Worksheet_Change(ByVal Target As Range)
Dim X As Long, LR As Long
If Target.Address(0, 0) = "A1" Then
LR = Cells(Rows.Count, "B").End(xlUp).Row
If Not (LR = 1 And Len(Cells(LR, "B").Value) = 0) Then LR = LR + 1
Application.EnableEvents = False
Cells(LR, "B").Value = Range("A1").Value
Application.EnableEvents = True
End If
End Sub

To install it, right click the tab at the bottom of the worksheet where you
want this functionality, select View Code from the popup menu and then
copy/paste the above code into the code window that appeared.

--
Rick (MVP - Excel)


 
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
Column Offset Update Alectrical Excel Programming 3 September 2nd 09 02:07 PM
For Rick Rothstein retired bill Excel Programming 1 May 7th 09 05:50 PM
Rick Rothstein Gordy99 Excel Programming 0 February 28th 08 07:05 PM
Question for Rick Rothstein Jenny B. Excel Discussion (Misc queries) 0 June 27th 07 07:06 PM
answer to Rick Axel Excel Programming 7 June 25th 07 09:00 PM


All times are GMT +1. The time now is 04:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"