Pessoal,
A macro abaixo teoricamente deveria travar as barras de rolagem de doas as abas de minha planilha, contudo não consigo fazer funcionar, alguém pode ajudar?
Abraços,
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Dim LastColumn As Integer
Dim LastRow As Long
Dim LastCell As Range
If WorksheetFunction.CountA(Sh.Cells) > 0 Then
'Search for any entry, by searching backwards by Rows.
LastRow = Sh.Cells.Find(What:="*", After:=Sh.Cells(1, 1), SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
If LastRow <> 65536 Then LastRow = LastRow + 1
'Search for any entry, by searching backwards by Columns.
LastColumn = Sh.Cells.Find(What:="*", After:=Sh.Cells(1, 1), SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
If LastColumn <> 256 Then LastColumn = LastColumn + 1
Sh.ScrollArea = Range(Cells(1, 1), Cells(LastRow, LastColumn)).Adress
Else
Sh.ScrollArea = ""
End If
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 24/02/2011 8:44 am