+ Reply to Thread
Results 1 to 11 of 11

Calender Help

  1. #1
    Greg B...
    Guest

    Calender Help

    I want a upcomings event diary to show me what is coming up in the next
    month, It will not allow anymore than 2 weeks. Is there any way to change
    this

    Also in the listbox on the userform it show the date time and event in 3
    columns how do I get the 1st column to show the date in the dd mm yyyy
    format

    Thanks again

    Greg

    Private Sub UserForm_Initialize()
    Do Until Sheet1.Range("a2").Offset(counter).Value > Now + 14
    counter = counter + 1
    Loop
    UserForm1.ListBox1.ColumnCount = 3
    UserForm1.ListBox1.List() = Sheet1.Range(Cells(2, 1), Cells(counter,
    3)).Value
    End Sub






  2. #2
    Bob Phillips
    Guest

    Re: Calender Help

    Wherever the date is inserted, use

    Format(Date, "dd mm yyyy")

    rather than just Date.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Greg B..." <[email protected]> wrote in message
    news:[email protected]...
    > I want a upcomings event diary to show me what is coming up in the next
    > month, It will not allow anymore than 2 weeks. Is there any way to

    change
    > this
    >
    > Also in the listbox on the userform it show the date time and event in 3
    > columns how do I get the 1st column to show the date in the dd mm yyyy
    > format
    >
    > Thanks again
    >
    > Greg
    >
    > Private Sub UserForm_Initialize()
    > Do Until Sheet1.Range("a2").Offset(counter).Value > Now + 14
    > counter = counter + 1
    > Loop
    > UserForm1.ListBox1.ColumnCount = 3
    > UserForm1.ListBox1.List() = Sheet1.Range(Cells(2, 1), Cells(counter,
    > 3)).Value
    > End Sub
    >
    >
    >
    >
    >




  3. #3
    Greg B...
    Guest

    Re: Calender Help

    It does not work, I tried that already.

    Thanks

    Greg



  4. #4
    Bob Phillips
    Guest

    Re: Calender Help

    So show us what you are doing in the code.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Greg B..." <[email protected]> wrote in message
    news:[email protected]...
    > It does not work, I tried that already.
    >
    > Thanks
    >
    > Greg
    >
    >




  5. #5
    Greg B...
    Guest

    Re: Calender Help

    Private Sub UserForm_Initialize()
    Do Until Sheet1.Range("a2").Offset(counter).Value > Now + 14
    counter = counter + 1
    Loop
    UserForm1.ListBox1.ColumnCount = 3
    UserForm1.ListBox1.List() = Sheet1.Range(Cells(2, 1), Cells(counter,
    3)).Value
    End Sub


    Thank you Bob

    Greg



  6. #6
    Bob Phillips
    Guest

    Re: Calender Help

    Greg,

    I assume that you are referring to the Listbox contents. Make sure the
    worksheet cells are formatted in the date format of choice, and use

    I have tried it and I don't get the problem. The dates load as format
    dd/mm/yyyy for me.
    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Greg B..." <[email protected]> wrote in message
    news:[email protected]...
    > Private Sub UserForm_Initialize()
    > Do Until Sheet1.Range("a2").Offset(counter).Value > Now + 14
    > counter = counter + 1
    > Loop
    > UserForm1.ListBox1.ColumnCount = 3
    > UserForm1.ListBox1.List() = Sheet1.Range(Cells(2, 1), Cells(counter,
    > 3)).Value
    > End Sub
    >
    >
    > Thank you Bob
    >
    > Greg
    >
    >




  7. #7
    Greg B...
    Guest

    Re: Calender Help

    I just will not work I will scrap it and start from scratch.

    Thanks anyway

    Greg



  8. #8
    Bob Phillips
    Guest

    Re: Calender Help

    Are your worksheet cells formatted?

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Greg B..." <[email protected]> wrote in message
    news:[email protected]...
    > I just will not work I will scrap it and start from scratch.
    >
    > Thanks anyway
    >
    > Greg
    >
    >




  9. #9
    Greg B...
    Guest

    Re: Calender Help

    I selected the whole column and in the custom tab I typed dd/mm/yyyy

    It changed it on the worksheet but when I ran the macro for the listbox it
    just showed it as mm/dd/yyyy

    I just cant see why it would happen Here is all the code in this workbook

    Sub run()
    UserForm1.Show

    End Sub

    Private Sub CommandButton1_Click()
    UserForm1.Hide

    End Sub


    Private Sub UserForm_Initialize()
    Do Until Sheet1.Range("a2").Offset(counter).Value > Now + 14
    counter = counter + 1
    Loop
    UserForm1.ListBox1.ColumnCount = 3
    UserForm1.ListBox1.List() = Sheet1.Range(Cells(2, 1), Cells(counter,
    3)).Value
    End Sub

    The Userform1

    just has a listbox and command button

    I cant see why at why it dont work

    Thanks

    Greg



  10. #10
    Bob Phillips
    Guest

    Re: Calender Help

    Wanna send me the workbook to take a look?

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Greg B..." <[email protected]> wrote in message
    news:[email protected]...
    > I selected the whole column and in the custom tab I typed dd/mm/yyyy
    >
    > It changed it on the worksheet but when I ran the macro for the listbox it
    > just showed it as mm/dd/yyyy
    >
    > I just cant see why it would happen Here is all the code in this workbook
    >
    > Sub run()
    > UserForm1.Show
    >
    > End Sub
    >
    > Private Sub CommandButton1_Click()
    > UserForm1.Hide
    >
    > End Sub
    >
    >
    > Private Sub UserForm_Initialize()
    > Do Until Sheet1.Range("a2").Offset(counter).Value > Now + 14
    > counter = counter + 1
    > Loop
    > UserForm1.ListBox1.ColumnCount = 3
    > UserForm1.ListBox1.List() = Sheet1.Range(Cells(2, 1), Cells(counter,
    > 3)).Value
    > End Sub
    >
    > The Userform1
    >
    > just has a listbox and command button
    >
    > I cant see why at why it dont work
    >
    > Thanks
    >
    > Greg
    >
    >




  11. #11
    Greg B
    Guest

    Re: Calender Help

    Thanks Bob, I feel stupid when I actually put the source into the
    properties box it all up dated to what I wanted.

    Sorry for being a twit and not doing that in the first place


    Thanks Greg\



+ Reply to 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