I think you can assign macro for combobox form control. Just right click on
the control and choose Assign Macro.
Best regards,
Alif Be
On Sat, Jun 1, 2013 at 1:35 AM, David Smart
<smartware.consulting@gmail.com>wrote:
> **
>
>
> You don't say whether it's a form control or an Active X control.
>
> For a form control, you might be stuck.
>
> For an Active X control, you can use the ComboBox_Change event to pick up
> changes made via the combo box. This will also fire if you change the
> linked cell directly, because that changes the combo box value..
>
> Regards, Dave S
>
>
> ----- Original Message -----
> From: "Tayyab" <sheikhtayyab@yahoo.com>
> To: <ExcelVBA@yahoogroups.com>
> Sent: Friday, May 31, 2013 10:50 PM
> Subject: [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]
>
> ------------------------------------
>
>
> ----------------------------------
> 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
>
> ----------------------------------Yahoo! Groups Links
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1432 / Virus Database: 3184/5871 - Release Date: 05/31/13
>
>
>
--
Best regards,
Alif Be
[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 (5) |
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