Results 1 to 200 of 352

Call in the Cavalry - 2014

Threaded View

  1. #11
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,717

    Re: Call in the Cavalry - 2014 onwards

    http://www.excelforum.com/excel-gene...reasheets.html

    I have provided a working solution for the OP for an onClose event, but he is looking for an instantaneous change. I tried a similar solution for the Workbook_Sheet Change Event and the Worksheet Change Event (putting the VBA in all three sheets for the worksheet change event).

    In all cases, the VBA just hangs. If I stop the VBA from running, it has updated the cells A1 and B1. If you have a solution for this, then please offer it up. For the record, here is what I tried in the worksheet change event for each of the sheets. Did I miss something to make it hang???

    Option Explicit
    
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$1" Then
    Dim myDate As Date
    myDate = Application.WorksheetFunction.Max(Sheets("Sheet1").Range("A1"), _
        Sheets("Sheet2").Range("A1"), Sheets("Sheet3").Range("A1"))
    Sheets("Sheet1").Range("A1") = myDate
    Sheets("Sheet2").Range("A1") = myDate
    Sheets("Sheet3").Range("A1") = myDate
    Sheets("Sheet1").Range("B1") = Environ("UserName")
    Sheets("Sheet2").Range("B1") = Environ("UserName")
    Sheets("Sheet3").Range("B1") = Environ("UserName")
    End If
    End Sub
    Last edited by alansidman; 05-18-2014 at 06:56 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Call in the Cavalry - 2015
    By davesexcel in forum The Water Cooler
    Replies: 297
    Last Post: 01-13-2016, 06:50 PM
  2. [SOLVED] Call in the cavalry -- need help solving this thread-prior to 2013
    By teylyn in forum The Water Cooler
    Replies: 821
    Last Post: 01-06-2015, 08:01 PM
  3. Call in the Cavalry - 2013
    By FDibbins in forum The Water Cooler
    Replies: 457
    Last Post: 01-06-2015, 08:00 PM
  4. Call in the Cavalry too long now so teach me something...
    By MarvinP in forum The Water Cooler
    Replies: 0
    Last Post: 12-26-2014, 04:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1