Closed Thread
Results 1 to 3 of 3

Excel daily diary

  1. #1
    Registered User
    Join Date
    06-26-2011
    Location
    Kuopio
    MS-Off Ver
    Excel 2007
    Posts
    18

    Excel daily diary

    Hello!

    first of all, my english is little bit rusty but I hope you'll get the point.

    So I'm creating some sort of diary for daily routines, like this;


    1. Person comes to work, he opens this excel-diary

    2. He chooses what day it is (I'm using calendar control, is it possible that it shows current time every time it opens??)

    3. He chooses Worker

    4. He chooses Weather

    5. He chooses temperature, first time at 7am, and another time in 12am

    6. At the end of the day, he writes down working time, like 07.00am - 3.00pm

    7. He writes down some notes, that came up during day, and he also writes some comments about work or something.

    8. He press commandbutton "SAVE", this is linked to cell F2 where he wrote his name, file will be saved as name written on cell.

    (COMMANDBUTTONS I'M USING ARE NOT ACTIVE-X COMPONENTS)

    9. And after this, he press commandbutton "NEW DATE", which will open a new sheet and also copies this original sheet into it. But it only opens 30 sheets, or days.

    Code I'm using for this;

    Sub NewSheet()
    Dim CurrentDay As Integer, NewName As String
    If IsNumeric(Right(ActiveSheet.Name, 2)) Then
    CurrentDay = Right(ActiveSheet.Name, 2)
    ElseIf IsNumeric(Right(ActiveSheet.Name, 1)) Then
    CurrentDay = Right(ActiveSheet.Name, 1)
    Else
    Exit Sub
    End If
    If CurrentDay >= 30 Then
    MsgBox "You cannot go higher than 30"
    Exit Sub
    End If
    CurrentDay = CurrentDay + 1
    NewName = "Day" & CurrentDay
    Dim checkWs As Worksheet
    On Error Resume Next
    Set checkWs = Worksheets(NewName)
    If checkWs Is Nothing Then
    Worksheets(ActiveSheet.Name).Copy After:=Worksheets(ActiveSheet.Index)
    With ActiveSheet
    .Name = NewName
    .Range("F2:M2").ClearContents
    End With
    Else
    Set checkWs = Nothing
    MsgBox "A Worksheet named " & NewName & " already exists."
    End If
    End Sub


    -----------------------------------------------------------------------

    Problem, or the big question, is that is it possible to link Calendar control to this code, that when person has selected all those 30 days of a month, he selects new month from calendar, and is able to start everything again, from day 1 ?????? Understand??? I don't know how to explain this easily....
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Excel daily diary

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Excel daily diary

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Your post does not comply with Rule 5 of our Forum RULES. We have Seven question forums: Miscellaneous, General, Programming, Worksheet Functions, Charting, Excel 2007 Help and New Users. Please choose the appropriate forum, and post your question in ONLY one forum.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

Closed Thread

Thread Information

Users Browsing this Thread

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

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