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: 53
Default stringtype returned

have a macro putting value "8000" [for example] to cell. notice that it is
string "8000", not number

when returned from function, like
function test1
test1="8000"
end function

and having formula in cell "=test1()" cell receives *text* type
[type(mycell)=2]

when cell modified from sub, like

sub test2
activecell.value="8000"
end sub

and invoking sub by run macro, cell receives *number* type [type(mycell)=1]

so, is there some [hidden] setting forcing text "8000" in second example not
to be converted to number when running macro?
to resolve this, in second case i need to put "'" & "8000" [simple quote in
front] to force text value. problem is that same method doesn't apply to
formula, since such quote becomes a part of returned value into cell.

is there anything to be done, or the things are simply like that?


thnx.



 
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
Limit returned value Patrick C. Simonds Excel Worksheet Functions 5 September 27th 08 02:29 PM
same name being returned Zombie0635 Excel Discussion (Misc queries) 8 October 26th 07 07:45 PM
#N/A value is returned Sai Excel Worksheet Functions 7 July 15th 07 11:05 PM
#Value! Returned ? John Excel Worksheet Functions 2 December 6th 04 08:55 PM
#Ref! Returned KRCowen Excel Programming 1 December 4th 04 08:16 AM


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