Results 1 to 2 of 2

Thread: I need help getting my calendar to work

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2017
    Posts
    1

    I need help getting my calendar to work

    I want to preface this question by saying that I am NOT a developer by any stretch. I manage a landscape company and one of our former employees wrote an excel workbook that has macros to help with our time tracking for our crews.

    He no longer works for us and we rely heavily on the program he wrote to track all of our crews' equipment times.

    The program uses the computers clock and calendar. Whenever we buy a new computer for a truck I download the program, but have always had to send it to him to get it to work and I know it has something to do with the calendar. I think he downloaded something else to get it to work, but I have no idea what it was.

    This is the message I get when I open the program on a new computer:

    'SETS UP THE FORM WHEN THE USER OPENS THE FORM
    Public Sub userform_Initialize()
    '---SETS THE TIME AND DATE IN THE TOP CORNER-----------------------------DATE & TIME----------
    Me.ticket_date = Format(Now(), "MMM DD 'YY ")
    Me.today_date.Text = ticket_date
    Me.ticket_time = Format(time(), "HH:MM ")
    Me.today_time.Text = ticket_time

    Anyone able to point me in the right direction?

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: I need help getting my calendar to work

    afaik the above code indicates two module level variables on the userform, which have todays date and time assigned to them, that value is then assigned to textboxes on the userform, there is no indication, from the code shown, that any calendar is used

    this code should never be presented to you unless you go into the userform code

    if the userform is supposed to display immediately when the workbook is opened, you may need to add a line of code to the workbook_open event (in the thisworkbook code pane), like
    Code:
    userform1.show
    possibly with some code to position and size the userform, maybe to conceal the workbook
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

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



Click Here to Expand Forum to Full Width