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: 1
Default How do I set Excel cell format to "Text" from VB.NET?

I'm looking for a code that I could use to format an excel cell dynamically
for an card account number field type with more than 15 digits.

Here is the scenario.

Column name: Card Account
Card account number: xxxxxxxxxxxxxxxx

I cannot format the cells as number so I have to format as text. However,
when I run the process with the VBA code that I have telling to format as
text (@) it gives me this result in scientific notation because of the
length, I think.
Here is the VBA .NET code:
Select Case sFieldType
Case "Text"
objWorksheet.Range(objWorksheet.Cells(2, i + 1),
objWorksheet.Cells(CStr(mlRecordCount), i + 1)).NumberFormat = "@"

I just need to display the acc. number as is...can someone please help me!
I gladly appreciatted,
Sincerely,
Marlei Taylor

 
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
Combine text from multiple cells into one cell - =(A1&","&A2","&A3 mh Excel Worksheet Functions 5 July 27th 09 02:40 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Excel: Changing "numeric $" to "text $" in a different cell. Heather_CCF Excel Worksheet Functions 1 September 5th 06 06:06 PM
I have to double click a cell for the "text" format to take Charles Excel Discussion (Misc queries) 2 January 24th 06 02:46 PM
How do I set Excel cell format to "Text" from VB.NET? John Brock Excel Programming 8 July 26th 05 04:36 AM


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