[AccessD] simple piece of month-naming code

Drew Wutka DWUTKA at Marlow.com
Fri Jul 17 16:45:33 CDT 2009


Just use MonthName

Ie:

Dim I as long
For i=1 to 12
	Debug.Print MonthName(i)
Next i

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Friday, July 17, 2009 3:31 PM
To: AccessD at databaseadvisors.com
Subject: [AccessD] simple piece of month-naming code

Private Sub UserForm_Activate()
  'Populate combobox1 with months, by name.
  Dim i As Integer
  For i = 1 To 12
    ComboBox1.AddItem Format("28/" & i & "/2009", "mmmm")
  Next
End Sub

I've been using that for years to populate a control with the names of
the 
months. I've been using it for so long, that I'm not sure if it's still 
necessary. Has VBA come up with a specific month-naming function that
might 
make this obsolete?

Susan H. 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the person or entity 
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business 
Sensitive material. If you are not the intended recipient, please contact the sender 
immediately and destroy the material in its entirety, whether electronic or hard copy. 
You are notified that any review, retransmission, copying, disclosure, dissemination, 
or other use of, or taking of any action in reliance upon this information by persons 
or entities other than the intended recipient is prohibited.





More information about the AccessD mailing list