Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Lorraine Stephens   on Mar 01 In MS Office Category.

  
Question Answered By: Ibadah Younis   on Mar 01

Sets to UK format
varJuniorDate = Format ( "DD/MM/YYYY")

... on how to address the issue  I have encountered the following errors:

Not sure if I have installed the format correctly (see below) but comes up
with an 'Overflow' error (6) when run?

Private Sub cmbOK_Click()
Dim varSeasonAge As Double
Dim varJnrSeasonAge As Double
Dim varSeasonDate As Date
Dim varJuniorDate As Date
Dim varDateOfBirth As Date

varSeasonDate = Format(DD / MM / YYYY)
varJuniorDate = Format(DD / MM / YYYY)
varDateOfBirth = Format(DD / MM / YYYY)

varSeasonDate = "01/09/2006"
varJuniorDate = "01/01/2007"

Although I have specified a 'Format' template for all three possible Date
fields it is the DateOfBirth that is causing the problem. May be a red
herring?

When I put the Format template in quotes ("") it came up with a 'Type
mismatch' error 13?

varSeasonDate = Format("DD/MM/varSea
varJuniorDate = Format("DD/MM/YYYY")
varDateOfBirth = Format("DD/MM/YYYY")

Again, being very new to VBA I may not be fully grasping where I should have
entered the suggested code.

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on US/UK Date conflict Or get search suggestion and latest updates.


Tagged: