LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Formatting variable problem

I have a problem formatting a variable.
if i place the following in a sub the variable value does not change; it
stays as "dd/mm/yy"

dim datCFwd as date
datCFwd = Sheets("Model").Range("Model_AccountingEnd").Value
datCFwd = Format(datCFwd, "dd mmm yy")

however if i pass this variable to another sub and run the same formatting
code the variable is changed to how i want it.

The Range("Model_AccountingEnd") is formatted as a Custom format "dd-mmm-yy"
and it does appear in this format on the relevant sheet.

if anyone has any ideas why this should be i will be very interested
--
with kind regards

Spike
 
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
formatting a variable problem Spike Excel Programming 3 October 16th 09 08:51 AM
problem formatting a variable Spike Excel Programming 2 October 15th 09 09:40 PM
Set formatting variable Sige Excel Programming 4 September 29th 05 11:41 PM
Formatting a Variable Arturo Excel Programming 1 October 18th 04 10:38 PM
Problem trying to us a range variable as an array variable TBA[_2_] Excel Programming 4 September 27th 03 02:56 PM


All times are GMT +1. The time now is 06:14 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"