Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #109963

Re: Formatting multiple sheets within workbook.

From Claus Busch <claus_busch@t-online.de>
Newsgroups microsoft.public.excel.programming
Subject Re: Formatting multiple sheets within workbook.
Date 2017-03-30 12:48 +0200
Organization A noiseless patient Spider
Message-ID <obinl1$85j$1@dont-email.me> (permalink)
References (1 earlier) <obdtd5$3th$1@dont-email.me> <7748fc30-de3e-42e2-8a5a-4f881cfed8fe@googlegroups.com> <obgkr7$739$1@dont-email.me> <obh9qb$l7e$1@dont-email.me> <f722d396-80cf-438a-8eb5-bbde006c810b@googlegroups.com>

Show all headers | View raw


Hi,

Am Thu, 30 Mar 2017 03:25:41 -0700 (PDT) schrieb Living the Dream:

> Thank you once again Garry.
> 
> I decided to go back to the drawing board and the melting-pot and cam up with the following which works to a degree as it gives me the end result I'm looking for but with 2 issues.
> 
> 1. It keeps flickering & looping over the same range on the same page.
> 2. It does not cycle through all the other sheet, just the active one.

the monitor flickering is because of Selection.

Try:

For Each sh In ActiveWorkbook.Sheets
    If InStr(sExclShts, sh.Name) Then
        
        With sh
            .Range(.Cells(11, 1), .Cells(26, 14)).Sort key1:=.Cells(4, 10), order1:=xlAscending, Header:=xlYes
        
        For col = 1 To 13
            Select Case .Cells(10, col).Value
            Case "Route Ref"
            myRef = col
            End Select
        Next col
        For i = 11 To 26
            myRef = .Cells(i, "A").Value
                If myRef <> .Cells(i + 1, "A").Value Then
                    With .Range(.Cells(i, 1), .Cells(i, 14))
                        With .Borders(xlEdgeBottom)
                            .LineStyle = xlDouble
                            .ColorIndex = 0
                            .TintAndShade = 0
                            .Weight = xlThick
                        End With
                     End With
                End If
                For Each c In rng
                    If c = "" Then
                        With c
                            .EntireRow.Delete
                        End With
                    End If
                Next c
        Next i
        End With
    End If
Next sh


Regards
Claus B.
-- 
Windows10
Office 2016

Back to microsoft.public.excel.programming | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Formatting multiple sheets within workbook. Living the Dream <noodnutt@gmail.com> - 2017-03-28 03:40 -0700
  Re: Formatting multiple sheets within workbook. Living the Dream <noodnutt@gmail.com> - 2017-03-28 03:42 -0700
  Re: Formatting multiple sheets within workbook. GS <gs@v.invalid> - 2017-03-28 10:56 -0400
    Re: Formatting multiple sheets within workbook. Living the Dream <noodnutt@gmail.com> - 2017-03-29 03:40 -0700
      Re: Formatting multiple sheets within workbook. GS <gs@v.invalid> - 2017-03-29 11:48 -0400
        Re: Formatting multiple sheets within workbook. GS <gs@v.invalid> - 2017-03-29 17:46 -0400
          Re: Formatting multiple sheets within workbook. Living the Dream <noodnutt@gmail.com> - 2017-03-30 03:25 -0700
            Re: Formatting multiple sheets within workbook. Claus Busch <claus_busch@t-online.de> - 2017-03-30 12:48 +0200
              Re: Formatting multiple sheets within workbook. Living the Dream <noodnutt@gmail.com> - 2017-03-30 06:16 -0700
                Re: Formatting multiple sheets within workbook. Claus Busch <claus_busch@t-online.de> - 2017-03-30 15:48 +0200
              Re: Formatting multiple sheets within workbook. GS <gs@v.invalid> - 2017-03-30 11:10 -0400
                Re: Formatting multiple sheets within workbook. Living the Dream <noodnutt@gmail.com> - 2017-03-31 04:03 -0700
                Re: Formatting multiple sheets within workbook. GS <gs@v.invalid> - 2017-03-31 07:13 -0400
              Re: Formatting multiple sheets within workbook. Living the Dream <noodnutt@gmail.com> - 2017-03-31 03:51 -0700
                Re: Formatting multiple sheets within workbook. GS <gs@v.invalid> - 2017-03-31 07:08 -0400
    Re: Formatting multiple sheets within workbook. Living the Dream <noodnutt@gmail.com> - 2017-03-29 03:52 -0700
  Re: Formatting multiple sheets within workbook. Living the Dream <noodnutt@gmail.com> - 2017-03-29 02:43 -0700
  Re: Formatting multiple sheets within workbook. Living the Dream <noodnutt@gmail.com> - 2017-04-03 04:12 -0700

csiph-web