Results 1 to 10 of 10

how to add a date when opening up the worksheet

Threaded View

  1. #7
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: how to add a date when opening up the worksheet

    one question for winon, when i set the workbook_open in the ThisWorkbook, the macro fails on the B1 line. thoughts?

    Private Sub Workbook_Open()
        
        If MsgBox("Should the date be updated at this time ? ", vbCritical + vbYesNo, ("Confirmation Required")) = vbYes Then
        Range("B1").Value = Range("B1").Value + 7
        Else: Range("B1").Value = Range("B1").Value
        Exit Sub
        End If
    
    End Sub
    the error is "run time error 1004, method range of object _Global failed
    Last edited by dmcgov; 12-28-2016 at 08:50 AM. Reason: added error code

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Date picker used to populate text box. Date changes back to original value on opening.
    By Stratfordoaks in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-07-2016, 09:42 AM
  2. Replies: 4
    Last Post: 03-12-2014, 02:06 AM
  3. Replies: 4
    Last Post: 01-24-2012, 12:52 PM
  4. Replies: 6
    Last Post: 10-03-2011, 04:26 PM
  5. Upon opening the WorkSheet, how to check the date
    By alghareeb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-29-2009, 08:52 AM
  6. Go to current date upon opening Worksheet
    By Jason in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-21-2006, 08:45 AM
  7. Replies: 3
    Last Post: 03-01-2006, 11:40 AM

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