Results 1 to 3 of 3

Help with Activate code when file opens

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Help with Activate code when file opens

    Hello:

    Please refer to attached file.
    I am using below code to put the formula in cell N1 when "Final"Sheet is activated.
    It works fine when i go to other sheet and come back to "FINAL" Sheet.
    But let me give you scenerio where it needs to work but does not work.

    Select say May18 from dropdown liast in cell N1.
    Save the file and reopen.
    Now when you open the file, it will not activate below code and hence you will see last saved version, in this case N1 will show May18 but i needed, N1=M1
    Private Sub Worksheet_Activate()
    Range("N1").Formula = "=M1"
    End Sub
    Let me know if you have any questions.
    Thanks.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Opens another workbook but doesn't activate it, ignores ScreenUpdating = False
    By natefarm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-01-2015, 11:24 AM
  2. Need code to check if file exists then activate conditional macro
    By mattheritage in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2014, 12:00 PM
  3. Speed up code that opens and pulls data from 30+ excel files and then closes file
    By chadwick140 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-06-2013, 09:58 AM
  4. [SOLVED] VBA Code to Enter File Name, Activate the File, and Run Macro on File
    By DHartwig35805 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-09-2012, 03:49 PM
  5. My code does not activate open .xls file
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-19-2011, 04:13 PM
  6. Replies: 4
    Last Post: 01-05-2006, 10:25 PM
  7. [SOLVED] opening an excel file opens a duplicate file of the same file
    By skm in forum Excel General
    Replies: 1
    Last Post: 12-07-2005, 01:55 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