Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

Re: Placing two tables in Analysis for office without overlap

$
0
0

I had modified this code to adjust by Columns (in case people are searching for solutions) - It would be nice for a Before_Redisplay call.....

 

 

Public Sub Callback_AfterRedisplay()

 


Dim columnLetter As String
Dim intMaxrow_crosstab1 As Integer

 

intMaxrow_crosstab1 = Range("SAPCrosstab1").Columns.Count

 

Application.ScreenUpdating = False

intMaxrow_crosstab1 = intMaxrow_crosstab1 + 1

columnLetter = ConvertToLetter(intMaxrow_crosstab1)

Columns(columnLetter & ":P").Select

Selection.EntireColumn.Hidden = True


Application.ScreenUpdating = True

 

End Sub

'Converts a column number to Letter - Code provided by Microsoft
Public Function ConvertToLetter(iCol As Integer) As String
   Dim iAlpha As Integer
   Dim iRemainder As Integer
   iAlpha = Int(iCol / 27)
   iRemainder = iCol - (iAlpha * 26)
   If iAlpha > 0 Then
      ConvertToLetter = Chr(iAlpha + 64)
   End If
   If iRemainder > 0 Then
      ConvertToLetter = ConvertToLetter & Chr(iRemainder + 64)
   End If
End Function


Viewing all articles
Browse latest Browse all 9164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>