Prikazi cijelu temu 28.09.2013 18:37
zxz Van mreze
Administrator
Registrovan od:03.02.2009
Lokacija:Tuzla


Predmet:Croshair
Ukoliko koristite ovu proceduru ona ce vam pomoci da vidite red i kolonu u odnosu na poziciju na aktivnu celiju.
PreuzmiIzvorni kôd (Visual Basic):
  1. Const HLColor As Long = 13434879
  2.  
  3.  Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  4.  Dim r As Range, rcol As Range, rrow As Range
  5.  Set r = Me.Range("A1:Z500")
  6.  If Intersect(Target, r) Is Nothing Then Exit Sub
  7.  Set rcol = Intersect(r, Target.EntireColumn)
  8.  Set rrow = Intersect(r, Target.EntireRow)
  9.  With Target
  10.  If .Count > 1 Then Exit Sub
  11.  r.FormatConditions.Delete
  12.  With rrow
  13.  .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
  14.  .FormatConditions(1).Interior.Color = HLColor
  15.  End With
  16.  With rcol
  17.  .FormatConditions.Delete
  18.  .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
  19.  .FormatConditions(1).Interior.Color = HLColor
  20.  End With
  21.  .FormatConditions.Delete
  22.  End With
  23.  End Sub

Podrška samo putem foruma, jer samo tako i ostali imaju koristi od toga.