Results 1 to 7 of 7

Macro Adjustment Needed

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-07-2008
    Location
    sCOTLAND
    MS-Off Ver
    Office 2003 SP3
    Posts
    256

    Macro Adjustment Needed

    Hi

    I have this code (below) that basically formats some cells and put ........ in place of the numbers that are there.
    Sub Clear_Data_Click()
    
    ActiveSheet.Unprotect
    
    Application.ScreenUpdating = False
    
        Cells.Locked = False
        Selection.FormulaHidden = True
      
    
    Dim strText As String
        
        With Range("H2,K2,N2,Q2,T2,W2,Z2,AC2")
            strText = .Value
            Mid(strText, 150, 9) = String(9, ".")
            Mid(strText, 9, 7) = String(7, ".")
            .Value = strText
            With .Characters(150, 9).Font
                  .ColorIndex = 3
                  .Size = 11
                  .Bold = True
    
            End With
            With .Characters(9, 7).Font
                  .ColorIndex = 3
                  .Size = 12
                  .Bold = True
            End With
        End With
        
        Application.ScreenUpdating = True
        
    End Sub
    I have just put an input box into the same range of cells that this code formats and i am now getting an error. I have tried to adjust the code but not having much luck. Could some have a look at this please

    I have attached a sample sheet

    Thanks
    Attached Files Attached Files
    Last edited by JimmiOO; 02-15-2010 at 07:57 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1