Jumat, 31 Mei 2013

RES: [ExcelVBA] auto run macro when link formula change

 

Try using event Calculate instead of Change

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Call HideColumns

End Sub

De: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] Em nome de
Tayyab
Enviada em: sexta-feira, 31 de maio de 2013 09:51
Para: ExcelVBA@yahoogroups.com
Assunto: [ExcelVBA] auto run macro when link formula change

hi
I have a sheet that have a combo box selection menu to select code, when
code is selected sheet auto changes value. then also have a macro that I
want to run . macro only run when I change any cell value, but not run when
changing the combo option.
I make attach code. Please help

Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range

Set KeyCells = Range("g6:i10") 'combo box link cell

If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then

Call HideColumns 'macro call that to hided black columns

End If
End Sub

Thanks & regards

Tayyab

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar