Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Dates in VBA functions

For entering credit payment dates
On a userform I have a control which displays "Date" with a calenda
control to change the value.
If the day value is between the 1st and 15th inclusive, of the month
chosen, then I require that a listbox is populated with the result o
textbox "total amount" divided by textbox "number of payments
according to the 2nd of the consecutive month chosen for the "number o
payments" as number of rows in listbox.
If the day value is between 16th and Last day of month then the paymen
date will be the 8th of the consecutive month.
Is such a date calculation possible and if so then how

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Using Dates in VBA functions

Sub test()
Dim d As Date
d = Now 'or whatever in your code
If Day(d) 16 Then
MsgBox " The owls are not what they seem to be"
Else
MsgBox "Doh!!"
End If
End Sub


HTH. Best wishes Harald

"christobal " skrev i melding
...
For entering credit payment dates
On a userform I have a control which displays "Date" with a calendar
control to change the value.
If the day value is between the 1st and 15th inclusive, of the month
chosen, then I require that a listbox is populated with the result of
textbox "total amount" divided by textbox "number of payments"
according to the 2nd of the consecutive month chosen for the "number of
payments" as number of rows in listbox.
If the day value is between 16th and Last day of month then the payment
date will be the 8th of the consecutive month.
Is such a date calculation possible and if so then how?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Dates in VBA functions

The date issue is clear now but how can I pass the required dates afte
calculating the payment day value to a listbox showing the consecutiv
payments according to the number of payments

Date = 1/1/2004
Total = 450
Payments =3
i.e.
2/2/2004 150$
2/3/2004 150$
2/4/2004 150

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use if functions with dates glitterbug99 Excel Worksheet Functions 1 January 28th 10 03:58 PM
Dates and IF Functions Happysapper Excel Worksheet Functions 3 June 1st 09 06:02 PM
If functions and dates spunkyjon Excel Worksheet Functions 4 July 24th 06 12:57 PM
If functions for dates if function for remaining days in month Excel Worksheet Functions 2 October 2nd 05 09:31 PM
worksheet functions with dates Michele Excel Worksheet Functions 3 December 6th 04 06:05 PM


All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"