Solved

programatically formating a cell/cellrange

Posted on 2006-07-15
3
336 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now