Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Instructions within VBA Functions

hi,
get rid of the 2 * 's and it will work. i use that command
all the time.
-----Original Message-----

Hi Tom,

The date serial is stored as a number i think. It's

alignment is
towards the right side of the cell.

I tried to select a particular cell after that by doing:


*Range("F4").Select*

But still it didn't select the cell :(



Tom Ogilvy Wrote:
The only reason the approach you show would not work

(given that the
cell to
be selected is in the activewindow) that I can think of

is if your
date
serial is being stored as a string rather than a number.

--
Regards,
Tom Ogilvy

"silvest" wrote

in message
...

I defined a function in VBA that converts dates keyed

in as YYYYMMDD
to
be displayed as DD/MM/YYYY using "DateValue" command

as well as the
Left, Mid and Right functions

However, excel will only display the dates in the

serial numbers.

After the conversion into serial numbers (before 'end

function'), i
had
this:


*ActiveCell.Select
Selection.NumberFormat = "dd/mm/yyyy"*

But somehow, it doesn't select that cell to convert

into dd/mm/yyyy
format.
I have to manually right click the cell and format it

as date.

Is there anyway to do this in VBA ?


--
silvest

--------------------------------------------------------

----------------
silvest's Profile:

http://www.excelforum.com/member.php?

action=getinfo&userid=14662
View this thread:

http://www.excelforum.com/showthread...hreadid=267289



--
silvest
----------------------------------------------------------

--------------
silvest's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=14662
View this thread:

http://www.excelforum.com/showthread...hreadid=267289

.

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
Template Instructions dd53 Excel Worksheet Functions 4 May 18th 09 10:21 PM
How to print detailed instructions for all functions in Excel? clark Excel Worksheet Functions 1 August 25th 05 10:47 AM
How to print detailed instructions for all functions in Excel? clark Excel Worksheet Functions 0 August 25th 05 04:26 AM
Instructions within VBA Functions silvest[_4_] Excel Programming 2 October 7th 04 04:33 PM
Instructions within VBA Functions silvest[_5_] Excel Programming 0 October 7th 04 04:22 PM


All times are GMT +1. The time now is 10:36 PM.

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"