Solved

programatically formating a cell/cellrange

Posted on 2006-07-15
3
339 Views
Last Modified: 2010-04-23
How do I programatically format a cell/cellrange  to General Date or Time Value from VB.NET.
The problem I'm having is I've got a formula that is returning a serial Value instead of Hour:Minutes:Sec in my excel sheet. I tought about using the Hour,Minute and second Function of Excel (and its working BUT its not formating the values properly for me.

Alternatively if I can find the Excel equivalent of VB.NET's funtion Format(String,"00"), I'll be good.
0
Comment
Question by:the_bachelor
  • 2
3 Comments
 
LVL 37

Expert Comment

by:Harisha M G
ID: 17115242
Hi the_bachelor,

Range("A1:A100").NumberFormat = "dd/mm/yyyy"

Cheers!
0
 
LVL 7

Author Comment

by:the_bachelor
ID: 17115342
mgh_mgharish, thats giving me a Day-Month-Year.
I need Hour-Minute-Second.
I Tried Range("A1:A100").NumberFormat = "T" but its a nogo.
0
 
LVL 37

Accepted Solution

by:
Harisha M G earned 30 total points
ID: 17115346
Range("A1:A100").NumberFormat = "hh:mm:ss"
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get the selected ValueMember of Combobox 5 40
Sql server insert 13 36
Create a datatable in vb.net dynamically 1 22
"Emulate" TAB key when press Enter Key 3 47
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question