G5 starts up with LEAD on, doesn't boot, fans go wild

This G5 was working well until two days ago when I used software update to go to 10.5.8, also updated QuickTime (all done after running Cocktail.) Gradual deterioration in performance since then: first problem was fans going to high about 5 minutes after startup, could only shut down with power button. Behavior became more erratic and so I wanted to get the data off before it died completely. Didn't make it.
I have checked the RAM, reset PMU, tried target mode all without results. When I push the power button, the white LED comes on (most of the time) I hear the Apple Chime (some of the time) but then nothing else happens except the fans going wild about 5 minutes later. Can't start from install disk, DiskWarrior. I did get the install disk to boot up a few hours ago and ran Disk Utility: result was a zillion "reserved space in the directory is full" or something like that. Disk Utility then stalled about a third of the way through, fans went wild. Had to power down with power button.
any ideas greatly appreciated.

Do you have another Mac with Firewire around to try DW from with the G5 in FireWire target disk mode...
http://support.apple.com/kb/HT1661
Does it boot to Single User Mode, CMD+s keys at bootup, if so try...
/sbin/fsck -fy
Repeat until it shows no errors fixed.
(Space between fsck AND -fy important).
Resolve startup issues and perform disk maintenance with Disk Utility and fsck...
http://docs.info.apple.com/article.html?artnum=106214
have you blown the dust out lately? Could it be heat related?

Similar Messages

  • My Mac Mini with Snow Leopard doesn't boot

    When booting, I see a gray screen, a blue screen and another gray with the
    little round activity meeter which suddenly stops, and the picture freezes.
    Is there any good step-by-step guide for troubleshooting this?
    I'm not sure I have 10.6.2, but I keep it upgraded.

    Is your Mac Mini purchased new since August 28, 2009? If it is, are you using the Mac Mini Snow Leopard installer disc? Only the disc prebundled with such Mac Minis will install a Mac OS X on those Mac Minis.
    If it is older, are you using the retail 10.6 installer disc which looks like * If not, only those discs, which are not labelled OEM, Upgrade, or DropIn will install 10.6 on your Mac. You can't use the disc prebundled with another Mac on it.
    Use the startup manager to boot the discs:
    http://docs.info.apple.com/article.html?artnum=106178
    If the hard disc is not apparent, a data recovery software may be necessary if your data is not backed up*:
    http://www.macmaps.com/backup.html
    If your hard drive is present, read what I said earlier about booting off the correct installer disc, if the hard disk is not able to boot, and booting off the Snow Leopard installer. That will allow you to repair the directory of a backed up system. If your system is not backed up, and won't boot, then look at my backup link above to recover your system first before attempting any installation or directory repair of your hard disc. Any attempt install a new system on a hard disc that won't boot an existing system will only result in a corrupted system. Any attempt to repair a directory may result in worse issues if the hard drive is marginal. So at least having a recovered data set if not a backed up one is essential before doing any repairs on your system.
    - * Links to my pages may give me compensation.

  • 2007 Intel Imac, installed a new Hdd. Started up with the install disc but it doesn't find my Hdd when asking for a destination volume to install the Mac OS.  The Hdd is recognized in system profiler. Any ideas?

    2007 Intel Imac, installed a new Hdd. Started up with the install disc but it doesn't find my Hdd when asking for a destination volume to install the Mac OS.  The Hdd is recognized in system profiler. Any ideas?

    Welcome to Apple Support Communities
    The hard drive is not formatted, and it must be formatted in "Mac OS Extended (Journaled)" in order to install OS X.
    Close the OS X installer, and go to Utilities menu (on the menu bar) > Disk Utility. Then, format your hard drive in "Mac OS Extended (Journaled)" as Format > http://pondini.org/OSX/DU1.html Finally, close Disk Utility and install OS X

  • Start SQL Server in single user mode with parameter -m doesn't work well

    C:\Windows\system32>net start mssqlserver /m "Microsoft SQL Server Management St
    udio - Query"
    The SQL Server (MSSQLSERVER) service is starting.
    The SQL Server (MSSQLSERVER) service was started successfully.
    C:\Windows\system32>sqlcmd -S . -e
    1> go
    1> select @@servername;
    2> go
    select @@servername;
    myserver
    (1 rows affected)
    1>
    As you can see, I'm still able to connect with sqlcmd prompt to SQL Server. According production doc of SQL Server 2014, it should not be conncting by sqlcmd. it shall only be connected by SSMS.
    below the original doc on msdn:
    Start SQL Server in Single-User Mode
    Provide Feedback
    Under certain circumstances, you may have to start an instance of SQL Server
    in single-user mode by using the startup option -m. For
    example, you may want to change server configuration options or recover a
    damaged master database or other system database. Both actions require starting
    an instance of SQL Server in single-user mode.
    Starting SQL Server in single-user mode enables any member of the computer's
    local Administrators group to connect to the instance of SQL Server as a member
    of the sysadmin fixed server role. For more information, see Connect to
    SQL Server When System Administrators Are Locked
    Out.
    When you start an instance of SQL Server in single-user mode, note the
    following:
    Only one user can connect to the server.
    The CHECKPOINT process is not executed. By default, it is executed
    automatically at startup.
    Note
    Stop the SQL Server Agent service before connecting to an instance of SQL
    Server in single-user mode; otherwise, the SQL Server Agent service uses the
    connection, thereby blocking it.
    When you start an instance of SQL Server in single-user mode, SQL Server
    Management Studio can connect to SQL Server. Object Explorer in Management
    Studio might fail because it requires more than one connection for some
    operations. To manage SQL Server in single-user mode, execute Transact-SQL
    statements by connecting only through the Query Editor in Management Studio, or
    use the
    sqlcmd utility.
    When you use the -m option with sqlcmd or
    Management Studio, you can limit the connections to a specified client
    application. For example, -m"sqlcmd" limits connections to a
    single connection and that connection must identify itself as the
    sqlcmd client program. Use this option when you are starting
    SQL Server in single-user mode and an unknown client application is taking the
    only available connection. To connect through the Query Editor in Management
    Studio, use -m"Microsoft SQL Server Management Studio - Query".
    Shawn

    Hi Shawn Xiao,
    For starting SQL Server instance in single user mode, we can add –m; parameter in SQL Server Configuration Manager, also we can run CMD with ‘Run as administrator’ and input the following statement.
    NET START MSSQLSERVER /m
    I do a test in SQL Server 2014 Express version, after starting SQL with Single User Mode, SQL Server will only accept one connection. If you connect to SQL Server with a user account, the following error will occur.
    Login failed for user ‘domain\username’. Reason: Server is in single user mode. Only one administrator can connect at this time.
    However, in your situation, you can connect to SQL Server and run T-SQL statement successfully, it can be due to connection with the administrator account in your sqlcmd.
    For more information, you can review the following article.
    http://zarez.net/?p=117
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • [SOLVED] How to start JACK with KDE 4? (and which JACK should I use?)

    Hi again
    I'm using KDE 4, and I've just installed JACK again, and since I can't find any decent documentation on this, I'm having a bit of a problem.
    Currently I have jack from [extra] installed, rather than jack2. When I try starting jack as the ArchWiki suggests, i.e. by typing "jackd -d alsa", I get the following error:
    $ jackd -d alsa
    jackd 0.120.1
    Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
    jackd comes with ABSOLUTELY NO WARRANTY
    This is free software, and you are welcome to redistribute it
    under certain conditions; see the file COPYING for details
    could not open driver .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
    JACK compiled with System V SHM support.
    loading driver ..
    creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
    control device hw:0
    the playback device "hw:0" is already in use. Please stop the application using it and run JACK again
    cannot load driver module alsa
    I've also tried jack2 from [community], and after starting it with "jack_control start", I get this...
    $ jack_control start
    --- start
    DBus exception: org.jackaudio.Error.Generic: Failed to start server
    So how do I start it? I'm guessing jack doesn't want to start because some other KDE application grabbed alsa before jackd (but I've been wrong before), and I don't have the slightest idea what jack2 is about with that "generic" error. If anyone would help me shed some light on this, I'd appreciate it a lot.
    Thanks in advance!
    Last edited by Wintershade (2011-03-26 19:22:08)

    @schivmeister thanks that one worked
    Yes, it was knotify4. So now this part works. I've switched to jack2 and it works flawlessly when starting it with jackd
    So this part is solved... now, would you be so kind (if you know) as to point me to some tutorials or howtos (or proper documentation, cos I can't find much of that either) on how to connect various ALSA channels with JACK?
    Basically, I want to route my PCM channel and the Mic channel into Capture 1 (or one to Capture 1 and other to Capture 2), since my Intel HDA audio card doesn't have the "Mix" or "What-U-Hear" or whatever as an available capture source. Any leads on that? (or do I have to open another thread for it?)
    TIA

  • I have a 3rd gen Ipod touch and when i connect it to my Macbook pro to sync it with itunes, it doesn't show up on iTunes. When I connect my iPhone 6 to my computer it syncs, backs up, ect. How do I connect this older iPod to my iTunes?

    I have a 3rd gen Ipod touch. When I connect it to my Macbook pro to sync it with itunes, it doesn't show up on iTunes. When I connect my iPhone 6 to my computer it syncs, backs up, ect. How do I make this older iPod show up on my iTunes?

    Hi ChristianHelpplz,
    Thanks for visiting Apple Support Communities.
    It seems like your iPod touch is not recognized by iTunes on your Mac, but your iPhone 6 is working normally.
    I recommend starting with these steps to troubleshoot your iPod touch and connection with your Mac:
    Check your USB connections
    Unplug other USB devices from your Mac and try again.
    Try a different USB port.
    Try a different USB cable.
    Restart your device
    Restart your iOS device or reset your iPod.
    Restart your Mac
    Turn your Mac off and back on.
    Update your software
    Check for software updates on your Mac.
    Check for an iTunes update.
    Check your security software
    If you have security software installed, learn how to resolve issues between iTunes and your security software.
    From:
    If you don't see your connected device in iTunes for Mac - Apple Support
    If you've tried these steps and your iPod touch is still not recognized, try placing it into Recovery Mode next:
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    Sincerely,
    Jeremy

  • My G5 is starting up with an icon of a file folder with the smile face. Motor runs loudly and then nothing. What is going on?, my G5 is starting up with an icon of a file folder with the smile face. Motor runs loudly and then nothing. What is going on?

    My G5 is starting up with an icon of a file folder with a blue smile face. The motor will run loudly for a few minutes and then nothing. I can not get it to run at all.
    Any suggestions?

    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    If that doesn't work, Does it boot to Single User Mode, CMD+s keys at bootup, if so try...
    /sbin/fsck -fy
    Repeat until it shows no errors fixed.
    (Space between fsck AND -fy important).
    Resolve startup issues and perform disk maintenance with Disk Utility and fsck...
    http://docs.info.apple.com/article.html?artnum=106214

  • My macbook pro model A1226 doesn't boot up and the screen is black, ived try all reset commands with no luck, or try to go in safe mode, and nothing, please help

    Help please, my macbook pro model A 1226 doesn't boot up, i hear the optical drive sound starting but no screen light or booting sound, ive'd tried all redet commands, and safe mode but no luck, can anyone give me an solution to my problem. Tnx

    It looks as if there's a problem with your GPU. With a Retina machine, that would mean replacement of just about everything, except, perhaps, the flash storage drive.
    Print you kernel panic when you go to your Apple Store appointment. I'm betting that it's a faulty GPU but they will be able to diagnose exactly where the problem lies.
    Good luck,
    Clinton

  • Download and installed LR6 and nothing happens with it. Doesn't open or a thing. Now what?

    Download and installed LR6 and nothing happens with it. Doesn't open or a thing. Now what? Do not know if I should uninstall it and try again or ????

    I had the same problem (Lightroom CC doesn't appear to run on Widnows) and your solution worked for me. Note that it isn't enough to just close and restart Creative Cloud. This is what I did:
    Open Creative Cloud
    Open Preferences and hit Sign Out
    Sign back in again...
    Now start Lightroom CC.  This brought up a dialog labelled Photoshop CC saying that it needed to be signed in. When I dismissed it Lightroom then started up.
    Something else I noticed that may help diagnose this issue is that the file amt.log contained the line:
         04/21/15 23:09:07:623 | [INFO] |  |  |  | AMT |  |  | 8804 | Application licensing status has changed to unlicensed.
    See also the article  Troubleshoot launch errors using logs | Creative Suite 5, CS5.5

  • Need formula to take text from one cell, add that to a serial number with leading zeros

    I'm trying to create a spreasdheet cell that simplifies creating videotape Numbers from a job name in cell and appends a serial number with leading zeros, and that would survive an export to EXCEL.
    The result would look like
     A Column
    Job Name
    B ColumnTape #
    Formula needed for B
    ClientName-TapeType-
    ClientName-TapeType-001
    =
    ClientName-TapeType-
    ClientName-TapeType-002
    =
    I've tried using a custom cell format that had the text in front of the (Integer) drag and drop, with three integers and leading zeros.
    That worked, but requires recreating the custom cell format for each client and tape type.
    So, I've used the formula =A2& in order to play around with different things, but haven't hit on something that adjusts for increased numbers and retains the leading zeros.
    I don't mind doing a starter for the first row and then adding +1 in the formulas for the rows below.
    I've done that using the custom cell formats for the first B cell and then using =Bx+1 in the following cells.  It works, but I'm hoping to find something simpler or that can be copied and pasted in multiple rows on one paste.
    Thanks in advance.
    Suggestions much appreciated!
    Ted

    Ted,
    This expression in B will give you the pattern I believe you are looking for:
    =A&RIGHT("00"&ROW()-1, 3)
    Here's a screen shot...
    Jerry

  • My Mac mini starts up with a black screen and white writing.

    Okay basically I purchased a Mac mini (Intel Core 2 Duo 1.8GHZ 1GB RAM model) in Feburay 2008, and in June 2008 i decieded to bring it to a store to get it upgraded to 2GB. At the store the guys told me my Mac mini wouldnt accept 2GB, they reckon it was 'cause of the logic board. So they put a new one in and was able to succesfully install 2GB.
    Since that day my Mac mini stopped starting up with the apple logo. Now it starts up with the white/greyish background without the apple logo, then goes to a black screen and just runs pass loads of white text then its ready to use with no problems. It does this all the time.
    I've read a little about the Kernal Panic and looked at pictures of it, but what I have doesn't look like the kernal panic pictures i'm seeing.
    So i am writing this pose to find out whats wrong with my Mac mini, can anyone help me?
    Oh, I nearly forgot. When i turn the Mac mini off it does the same black screen with white text stuff before fully shutting down.

    Restart the computer with the Option, Command, P, and R keys held down, and release them when you hear the second startup chime; this clears a setting which causes it to start up into verbose mode each time.
    (35613)

  • Login with adobe ID doesn't work

    Hello I cannot login with my adobe-ID on a second computer. may be I use the wrong format:
    Iused only the string and also with leading URN:uuid -- but it doesn't work
    email: [email protected]@

    Hello,
    You need to create Adobe id and then authorize ade with the id.
    Sign in - Adobe ID

  • Problem starting servers with nodemanager

    Hi,
    I'm following the Oracle By Example:
    [http://www.oracle.com/technology/obe/fusion_middleware/wls103/InstallConfig/admin_mngd_srvr/admin_ms_using_nm.htm]
    I have installed on Windows (not on Linux), but that shouldn't make much difference.
    Now look at what I got on Step 10 of the OBE:
    OUTPUT
    D:\oracle\Middleware\user_projects\domains\dizzyworld\bin>startManagedWebLogic.cmd dizzy1 http://localhost:7001
    JAVA Memory arguments: -Xms256m -Xmx512m -Xns128m -Xgcprio:pausetime -XpauseTarget:200ms
    WLS Start Mode=Production
    CLASSPATH=D:\oracle\MIDDLE~1\patch_wls1032\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\oracle\MIDDLE~1\JROCKI~1.5-3\lib\to
    ols.jar;D:\oracle\MIDDLE~1\utils\config\10.3\config-launch.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\oracle\MIDDLE~1\W
    LSERV~1.3\server\lib\weblogic.jar;D:\oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.2.0.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\ser
    ver\lib\webservices.jar;D:\oracle\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;D:\oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;D:
    \oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar;D:\oracle\MIDDLE~1\pa
    tch_wls1032\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\oracle\MIDDLE~1\JROCKI~1.5-3\lib\tools.jar;D:\oracle\MIDDLE~1\util
    s\config\10.3\config-launch.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.j
    ar;D:\oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.2.0.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\orac
    le\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;D:\oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;.;C:\Program Files\Java\jre6\lib\
    ext\QTJava.zip
    PATH=D:\oracle\MIDDLE~1\patch_wls1032\profiles\default\native;D:\oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;D:\oracle\MIDDLE~1\WLSERV~1
    .3\server\bin;D:\oracle\MIDDLE~1\modules\ORGAPA~1.0\bin;D:\oracle\MIDDLE~1\JROCKI~1.5-3\jre\bin;D:\oracle\MIDDLE~1\JROCKI~1.5-3\bin;D:\oracl
    e\MIDDLE~1\patch_wls1032\profiles\default\native;D:\oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;D:\oracle\MIDDLE~1\WLSERV~1.3\server\bin
    ;D:\oracle\MIDDLE~1\modules\ORGAPA~1.0\bin;D:\oracle\MIDDLE~1\JROCKI~1.5-3\jre\bin;D:\oracle\MIDDLE~1\JROCKI~1.5-3\bin;D:\app\alsemgpa\produ
    ct\11.2.0\dbhome_2\bin;D:\oracle\product\11.1.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Win
    dowsPowerShell\v1.0\;C:\Program Files\Microsoft Application Virtualization Client;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program File
    s\Windows Imaging\;C:\Program Files\IDM Computer Solutions\UltraEdit-32;C:\Program Files\QuickTime\QTSystem\;D:\oracle\MIDDLE~1\WLSERV~1.3\s
    erver\native\win\32\oci920_8;D:\oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    [INFO ][memory ] GC mode: Garbage collection optimized for throughput, initial strategy: Generational Parallel Mark & Sweep
    [INFO ][memory ] heap size: 65536K, maximal heap size: 1048576K, nursery size: 32768K
    [INFO ][memory ] s-end: GC beforeK-after K (heap K), pause ms
    [INFO ][memory ] s/start - start time of collection (seconds since jvm start)
    [INFO ][memory ] end - end time of collection (seconds since jvm start)
    [INFO ][memory ] before - memory used by objects before collection (KB)
    [INFO ][memory ] after - memory used by objects after collection (KB)
    [INFO ][memory ] heap - size of heap after collection (KB)
    [INFO ][memory ] pause - total sum of pauses during collection (milliseconds)
    [INFO ][memory ] run with -Xverbose:gcpause to see individual pauses
    java version "1.6.0_14"
    Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
    BEA JRockit(R) (build R27.6.5-32_o-121899-1.6.0_14-20091001-2107-windows-ia32, compiled mode)
    Redirecting output from WLS window to D:\oracle\MIDDLE~1\USER_P~1\domains\DIZZYW~1\servers\AdminServer\logs\garbage.log
    Het proces heeft geen toegang tot het bestand omdat het door een ander
    proces wordt gebruikt.
    D:\oracle\Middleware\user_projects\domains\dizzyworld\bin>
    The last line says in Dutch "The process has no access to the file because it is being used by another process". I don't know if that is relevant.
    Question
    Now when I go back to my admin console, I don't see dizzy1 server RUNNING, it has status SHUTDOWN. Screen refresh doesn't help either.
    Any suggestions ??
    Edited by: PaulAlsemgeest on Apr 12, 2010 9:43 AM
    Edited by: PaulAlsemgeest on Apr 12, 2010 9:44 AM
    Edited by: PaulAlsemgeest on Apr 12, 2010 9:44 AM
    Edited by: PaulAlsemgeest on Apr 12, 2010 9:45 AM
    Edited by: PaulAlsemgeest on Apr 12, 2010 9:45 AM

    user12115898 wrote:
    Try to see if anything is running on that port ( the port you specified for dizzy1) also try to see if anything is running with the name dizzy1 on that box. Because sometime it happens that console doesnt update so if anything is running on that box with the same name or on that port, then kill it and try to restart it again.Hi,
    I did an netstat -na > checkports.log
    The server dizzy1 has been configured with Listen Port 7003 and SSL Listen Port 7004. Both are not in the checkports.log.
    What I did see in my nodemanager.log was:
    Domains file not found: D:\oracle\MIDDLE~1\WLSERV~1.3\common\NODEMA~1\nodemanager.domains, this is strange, because the file is really there.
    And when I try to start server dizzy1, the Console gives the
    Messages
    -  Warning For server dizzy1, the Node Manager associated with machine dizzyMachine1 is not reachable.
    - Warning All of the servers selected are currently in a state which is incompatible with this operation or are not associated with a running Node Manager or you are not authorized to perform the action requested. No action will be performed.
    Any further help greatly appreciated.

  • Facing error as Not in an application scope - start Orion with the -userThr

    hi all,
    iam facing this error when an jsp which is in Oracle portal(emebedded in iframe code) is updating a flag in database through a datasource configured on portal side.
    Naming Service=Not in an application scope - start Orion with the -userThreads switch if using user-created threads
    regards,
    Ravi

    I encounter the same issues when using the TimerTask to access the JNDI tree. I have found success when I move my business logic to an EJB and call my EJB from my TimerTask. It's a bit more work, but not much. The EJB inherits it's identity based on it's configuration and has no trouble accessing the JNDI tree whenever it's called. Try this and see if your problem doesn't go away.
    Hope this helps,
    Perry Tew

  • Display numbers formatted with leading zeros or spaces.

    There are some cases where you might need to display numbers with leading zeros or leading spaces, or trailing zeros.  I experimented with several methods and came up with some examples.  This is a Console application, but the results can just
    as well be output to a listbox in a Windows form.
    Sub Main()
    Dim snum As String, inum As Integer = 56
    snum = inum.ToString()
    Console.WriteLine(snum & vbTab & " ToString()")
    snum = inum.ToString("D4") 'adds leading zeros
    Console.WriteLine(snum & vbTab & " ToString(""D4"")")
    snum = inum.ToString("F4") '4 decimal places with trailing zeros
    Console.WriteLine(snum & vbTab & " ToString(""F4"")")
    Console.WriteLine()
    snum = String.Format("{0,4}", inum) 'leading spaces
    Console.WriteLine(snum & vbTab & " Format{0,4}")
    snum = String.Format("{0:D4}", inum) 'leading zeros
    Console.WriteLine(snum & vbTab & " Format{0:D4}")
    snum = String.Format("{0:F4}", inum) '4 decimal places with trailing zeros
    Console.WriteLine(snum & vbTab & " Format{0:F4}")
    Console.WriteLine()
    snum = inum.ToString().PadLeft(4, "0"c) 'leading zeros
    Console.WriteLine(snum & vbTab & " PadLeft(4, ""0""c)")
    snum = inum.ToString().PadLeft(4, " "c) 'leading spaces
    Console.WriteLine(snum & vbTab & " PadLeft(4, "" ""c)")
    Console.ReadLine() Console.Clear()
            For x As Integer = 1 To 20
                snum = x.ToString("D4")
                Console.WriteLine(snum)
            Next x
            Console.ReadLine()
    End Sub
    Solitaire

    I would add that many of these methods also work with numeric types that are not integers.
    Note that the "D4" format string doesn't work for non-integral types (such as Double and Decimal), and the "F4" format string doesn't pad with trailing zeros, it rounds to 4 decimal places (which can lose information). PadLeft works with
    the entire string, it isn't aware of the decimal point.

Maybe you are looking for

  • Form Controls stop working after December 2014 Updates

    For some users, Form Controls (FM20.dll) are no longer working as expected after installing MS14-082 Microsoft Office Security Updates for December 2014. Issues are experienced at times such as when they open files with existing VBA projects using fo

  • T510. Optimus technology support in Win XP

    Hello, Have Lenovo T510 4349-PG9 with optimus technology. Need to use WinXP SP3 instead of Win7. I have installed WinXP SP3 with all updates, but can't install NVS 3100M driver. After i switch video card to NVS3100M in BIOS instead of optimus option,

  • 'Sort order column' doesn't work for prompt with function

    I turned on the 'sort order column property' in repository for a logic column 'school year', so when I get school year from prompt, it shows desc order. It works fine if th colume in prompt is a simple prompt. But when I add function in the column in

  • Ipod freezes, cant format

    Can someone help, i have a new 20g colour ipod, when i load disc and am told to connect ipod my laptop freezes, i have been on apple web site and tried everything they have said to try. I have windows xp, sp2, 384mb, and purchased a note card for hig

  • Dell latitude 10 ST2e wont Boot

    My Latitude 10 St2E wont boot. All I get is the power light and the camera light flashing. It will charge. Are there any suggestions as to what is the problem