|
-
July 31st, 2001, 12:26 PM
#1
VB Formatting
I am working with an Excel file. I was trying to record a macro that would change the format of a range of cells, but it replaced the data that was in the cells with the test that I had recorded. I have searched through the Help files for the answer, but haven't found anything that works.
I need the data that is formatted as "0000" to be reformatted as "hh:mm".
I would apprieciate any help getting me on the right track.
Brent
-
August 3rd, 2001, 07:01 AM
#2
Re: VB Formatting
search in help of VBA for "Format" or "Format$" function
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
August 3rd, 2001, 07:07 AM
#3
Re: VB Formatting
private Function UnFormatIt(byval sIn as string) as string
UnformatIt = Left$(sIn,2) & ":" & mid$(sIn,2)
End Function
HTH,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Check out the new downloads - ImageMap.ocx is the VB control that emulates an HTML image map, EventVB.OCX for adding new events to your VB form and adding System Tray support simply, MCL Hotkey for implemenmting system-wide hotkeys in your application...all with source code included.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|