Problem :SICK: Unable to Set Text Property of Range Class

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Problem :SICK: Unable to Set Text Property of Range Class

  1. #1
    Join Date
    Jan 2007

    Question Problem :SICK: Unable to Set Text Property of Range Class

    Hi i Have tried dMuch to set the Value In THe excel sheet from VIasual Basic But Cant Set .the Value Are Stored in Excel as a number i.e. Cell Format is in Number. I Want to Change The Format of Cell To Text


    Set The Following Value in the Excel Sheet.

    oSheet.Range("B2").Value = "0002e001"
    plz try it. the VAlue Stored in Excel Sheet is :2.00 e 001

    Reply Immediately

  2. #2
    Join Date
    Aug 2004
    Orange, California
    Excel thinks it is a number in scienctific notation because of the 'e' which is the exponent seperator. Try forcing the numeric format to be a string like this:
    oSheet.Range("M3").Cells().NumberFormat = "@"
    oSheet.Range("M3").Value = "0002e001"

  3. #3
    Join Date
    Nov 2003
    Portland, OR
    Or simply precede the number with a single quote:

    oSheet.Range("M3").Value = "'0002e001"
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Triangle Property (class)
    By geo039 in forum .NET
    Replies: 2
    Last Post: 12-13-2006, 01:52 PM
  2. Getting a GUI to run
    By Eric in forum Java
    Replies: 4
    Last Post: 04-14-2006, 09:09 AM
  3. Assigning a TextBox Control via a Class Property
    By Miles Tones in forum VB Classic
    Replies: 2
    Last Post: 06-30-2005, 12:57 PM
  4. Replies: 0
    Last Post: 04-26-2001, 10:01 PM
  5. simple XML APPENDING problem
    By scopee in forum XML
    Replies: 4
    Last Post: 04-13-2001, 03:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center