Consulting

Results 1 to 3 of 3

Thread: Solved: Major issue blank cells

  1. #1

    Solved: Major issue blank cells

                With Range("Talk_Time").SpecialCells(xlCellTypeBlanks)
                        .NumberFormat = "hh:mm:ss"
                    End With
    My code looks changes the format of all blanks cells in range ("Talk_Time") to HH:MM:SS.

    but if there are no blank cells it throws up a debug message cells not found.. ? can anyone help

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]
    On Error Resume Next

    Set rng = Range("Talk_Time").SpecialCells(xlCellTypeBlanks)
    On Error Goto 0

    If Not rng Is Nothing Then rng.NumberFormat = "hh:mm:ss"
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    thanks mate

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •