Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine year over year date for comparison zeroscou Excel Worksheet Functions 3 March 6th 09 10:01 PM
What is the best method to add a date picker to a spreadsheet? Paul Excel Discussion (Misc queries) 1 April 12th 07 02:36 AM
Year-to-date year to date formula Philm Excel Worksheet Functions 1 October 7th 05 02:50 AM
Date formula: return Quarter and Fiscal Year of a date Rob Excel Discussion (Misc queries) 7 May 11th 05 08:48 PM
Need a method to extract the Date from a cell to a new cel Paul Excel Programming 5 November 2nd 03 07:24 AM


All times are GMT +1. The time now is 05:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"