Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Simple Question

Hi there... I'm using an Excel object model component in Visual FoxPro to
write data to an excel sheet. It's the same as the Microsoft Excel object
model.

I've gotten the data written out but there are columns in which some rows
have character data and some have numbers. I want to apply "Text"
formatting instead of "General" formatting to these cells. However for the
life of me, I can't figure out what property/method in the Excel object
model to use to make the Range formatted as "Text". Can someone point me to
what I need? Thanks!

Bill


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Simple Question

One way:

rng.Numberformat = "@"

In article ,
"Bill Henning" <please @ nospamforactiprosoftware.com wrote:

Hi there... I'm using an Excel object model component in Visual FoxPro to
write data to an excel sheet. It's the same as the Microsoft Excel object
model.

I've gotten the data written out but there are columns in which some rows
have character data and some have numbers. I want to apply "Text"
formatting instead of "General" formatting to these cells. However for the
life of me, I can't figure out what property/method in the Excel object
model to use to make the Range formatted as "Text". Can someone point me to
what I need? Thanks!

Bill

  #3   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Simple Question

Recording a macro in Excel gives the NumberFormat property of the Selection
or Range object. Text format is "@".

HTH
Ed

"Bill Henning" <please @ nospamforactiprosoftware.com wrote in message
...
Hi there... I'm using an Excel object model component in Visual FoxPro to
write data to an excel sheet. It's the same as the Microsoft Excel object
model.

I've gotten the data written out but there are columns in which some rows
have character data and some have numbers. I want to apply "Text"
formatting instead of "General" formatting to these cells. However for

the
life of me, I can't figure out what property/method in the Excel object
model to use to make the Range formatted as "Text". Can someone point me

to
what I need? Thanks!

Bill




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
Simple question [email protected] New Users to Excel 4 March 24th 08 07:47 PM
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM
a simple question David Price[_2_] Excel Programming 0 September 1st 03 02:13 PM


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