+ Reply to Thread
Results 1 to 10 of 10

how to add a date when opening up the worksheet

Hybrid View

dmcgov how to add a date when... 12-27-2016, 10:35 AM
Logit Re: how to add a date when... 12-27-2016, 11:08 AM
Richard Buttrey Re: how to add a date when... 12-27-2016, 12:15 PM
Winon Re: how to add a date when... 12-27-2016, 01:18 PM
dmcgov Re: how to add a date when... 12-28-2016, 08:15 AM
dmcgov Re: how to add a date when... 12-28-2016, 08:53 AM
dmcgov Re: how to add a date when... 12-28-2016, 08:49 AM
Winon Re: how to add a date when... 12-28-2016, 09:09 AM
dmcgov Re: how to add a date when... 12-28-2016, 09:28 AM
Logit Re: how to add a date when... 12-28-2016, 10:58 AM
  1. #1
    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

    thanks logit and richard.

    winon, i like your code but i changed the "Range("G1").Value to 7 and now it works the way i was expecting it to. Thanks very much for your code. Gold stars all around.

  2. #2
    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

    so nevermind, i figured it out. just needed to source the range, like so:

    Private Sub Workbook_Open()
        
        If MsgBox("Should the date be updated at this time ? ", vbCritical + vbYesNo, ("Confirmation Required")) = vbYes Then
        Sheets("HWI").Range("B1").Value = Sheets("HWI").Range("B1").Value + 7
        Else: Range("B1").Value = Range("B1").Value
        Exit Sub
        End If
    
    End Sub

+ Reply to Thread

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