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: 6
Default Convert String Representation of Excel Constant to Actual Value

I'm importing a fixed width text file into another workbook using
workbooks.opentext and would like to store all the setup info for this
process in a table within an Excel sheet so the user can change the
setup when they need to.

At the moment, I have columns for Field Headings (text), Field Format
(being the text for xlColumnDataTypes), and start position (integer).

When I read the data in however, the FieldInfo is expecting an integer
Excel constant (eg xlTextFormat or 2), rather than the text of this
(eg "xlTextFormat").

Is there a way to convert from a string representation of an Excel
constant to the constant's actual value?

I thought of using Evaluate (but that's only for cell/range
references) or CInt (doesn't work either). I'm kludging it at the
moment by doing a vlookup and getting the appropriate integer value
that way but surely there's a more elegant solution?

Any ideas?

tia

Jeff

 
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
Replacing a formula with the actual string or number Erik Excel Discussion (Misc queries) 1 February 6th 10 06:17 AM
get actual date from variable text string NickHK Excel Programming 0 December 20th 06 04:42 AM
get actual date from variable text string Jon Peltier Excel Programming 0 December 19th 06 03:12 PM
VB.Net - retrieve actual formula string Grant Excel Programming 1 August 20th 06 06:14 PM
Change Defined Name Constant String Ronster Excel Programming 3 August 8th 06 05:07 AM


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