View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default function runs in VBE, but not from spreadsheet

That won't work... intMonth is a number from 1 to 12... the Format function
will return Jan for each one of them. Following the structure I used in the
worksheet function I posted, you would need to do this to get it to work...

strMonth = Format(28 * intMonth, "MMM")

--
Rick (MVP - Excel)


"Jacob Skaria" wrote in message
...
From the Insert Function window select category as 'User Defined' and
select
the below function.

However the below function can be simplified using

strMonth = Format(intMonth,"MMM")

If this post helps click Yes
---------------
Jacob Skaria