Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default convert constant string to integer

Here's a few for you

' DataTypeEnum
Private Const adArray As Long = 8192
Private Const adBigInt As Long = 20
Private Const adBinary As Long = 128
Private Const adBoolean As Long = 11
Private Const adBSTR As Long = 8
Private Const adChapter As Long = 136
Private Const adChar As Long = 129
Private Const adCurrency As Long = 6
Private Const adDate As Long = 7
Private Const adDBDate As Long = 133
Private Const adDBTime As Long = 134
Private Const adDBTimeStamp As Long = 135
Private Const adDecimal As Long = 14
Private Const adDouble As Long = 5
Private Const adEmpty As Long = 0
Private Const adError As Long = 10
Private Const adFileTime As Long = 64
Private Const adGUID As Long = 72
Private Const adIDispatch As Long = 9
Private Const adInteger As Long = 3
Private Const adIUnknown As Long = 13
Private Const adLongVarBinary As Long = 205
Private Const adLongVarChar As Long = 201
Private Const adLongVarWChar As Long = 203
Private Const adNumeric As Long = 131
Private Const adPropVariant As Long = 138
Private Const adSingle As Long = 4
Private Const adSmallInt As Long = 2
Private Const adTinyInt As Long = 16
Private Const adUnsignedBigInt As Long = 21
Private Const adUnsignedInt As Long = 19
Private Const adUnsignedSmallInt As Long = 18
Private Const adUnsignedTinyInt As Long = 17
Private Const adUserDefined As Long = 132
Private Const adVarBinary As Long = 204
Private Const adVarChar As Long = 200
Private Const adVariant As Long = 12
Private Const adVarNumeric As Long = 139
Private Const adVarWChar As Long = 202
Private Const adWChar As Long = 130

Regards,
Peter T


"Rob Wills" wrote in message
...
Hi,

Im looking to return the value of an object constant from the string
equivelent.

As an example I am passing "adInteger" as a string, and wish to return the
integer value (from ADO).

I know this can be laid out in a case statement - but I thought there
might
be a better way.

I've tried CallByName - but I couldn't get this to work

Any other suggestions?

Many thanks
Rob



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
Decimals Constant to 0.50 or Nearest Integer Esssa Excel Worksheet Functions 3 October 23rd 08 11:56 AM
Convert String Representation of Excel Constant to Actual Value [email protected] Excel Programming 5 July 10th 07 09:49 AM
convert string to integer eugene Excel Programming 7 February 20th 07 07:00 PM
Is there a function to convert a string representing an integer i. perin Excel Programming 1 October 6th 04 09:36 PM
How do I convert an integer variable to a string variable? dumbass Excel Programming 2 May 21st 04 07:34 PM


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