Thread: month name
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default month name

hi
something like this might work
Sub robcpettit()
Dim m As String
Dim ib As String
ib = InputBox("enter date")
m = WorksheetFunction.Text(ib, "mmmm")
Sheets("sheet1").Name = m
End Sub

regards
FSt1
"RobcPettit" wrote:

Hi, using an input box in vba, were a date ia added, I want to name
worksheets based on the month of the given date. For example if
21/6/08 was entered, then my worksheet will be called June. How do I
get the information using vba.
Regards Robert