View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default date/year method

Hi
one way:
sub month_year()
dim rng as range
set rng = activesheet.range("A6")
rng.value = now
rng.numberformat = "MMM - YYYY"
end sub

assign a button to this macro


--
Regards
Frank Kabel
Frankfurt, Germany

JohnE wrote:
I am wanting the current month and year to show in range
(A6) thru the use of code and a button. But, I am having
difficulty using the month(date) as it returns a number
for the month. I haven't tried to add the year until I
get the month figured out.
How do I go about getting the Month - Year into a cell
from code?
Thanks for any assistance.
*** John