Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 20
Default Dropbox change Trigger an event

I tried a bit to figure this out, and I cant seem to get it. The goal is to have a function trigger off of a change in the drop down list that exists in cell F1. The dropdown makes it hard. But I don't know how else to do it because I already have a bunch of manual trigger macros with buttons, this one would be nice to have trigger itself I suppose.

Range(F1) changes need to call "Process"

Thanks,
Pistolade
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Dropbox change Trigger an event

I tried a bit to figure this out, and I cant seem to get it. The goal
is to have a function trigger off of a change in the drop down list
that exists in cell F1. The dropdown makes it hard. But I don't know
how else to do it because I already have a bunch of manual trigger
macros with buttons, this one would be nice to have trigger itself I
suppose.

Range(F1) changes need to call "Process"

Thanks,
-Pistolade-


Use the _Change event of the sheet containing the DV list. Just have
the code run "process" when Target = Range("F1"). (Though I'd use a
defined named for F1)

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("F1") Then _
MsgBox "you selected '" & Target.Value & "'!"
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Junior Member
 
Posts: 20
Default

Quote:
Originally Posted by GS[_2_] View Post
I tried a bit to figure this out, and I cant seem to get it. The goal
is to have a function trigger off of a change in the drop down list
that exists in cell F1. The dropdown makes it hard. But I don't know
how else to do it because I already have a bunch of manual trigger
macros with buttons, this one would be nice to have trigger itself I
suppose.

Range(F1) changes need to call "Process"

Thanks,
-Pistolade-


Use the _Change event of the sheet containing the DV list. Just have
the code run "process" when Target = Range("F1"). (Though I'd use a
defined named for F1)

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("F1") Then _
MsgBox "you selected '" & Target.Value & "'!"
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
could you by chance explain what the "Option explicit" line does?

ive tried _Change and _Calculate, neither has worked. they just wont trigger for some reason.

unless it would need to be in the "ThisWorkbook" since its a live update thing?

Last edited by Pistolade : May 20th 14 at 08:30 PM Reason: rewrite
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Dropbox change Trigger an event

'GS[_2_ Wrote:
;1617485'] I tried a bit to figure this out, and I cant seem to get
it. The goal -
is to have a function trigger off of a change in the drop down list
that exists in cell F1. The dropdown makes it hard. But I don't
know how else to do it because I already have a bunch of manual
trigger macros with buttons, this one would be nice to have
trigger itself I suppose.

Range(F1) changes need to call "Process"

Thanks,
-Pistolade--


Use the _Change event of the sheet containing the DV list. Just have
the code run "process" when Target = Range("F1"). (Though I'd use a
defined named for F1)

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("F1") Then _
MsgBox "you selected '" & Target.Value & "'!"
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


could you by chance explain what the "Option explicit" line does?


Option Explicit goes at the top of all code windows. It means you MUST
declare/define all variables with a 'Dim' statement, and is considered
'Best Practice' when writing code.

ive tried _Change and _Calculate, neither has worked. they just wont
trigger for some reason.


Has Application.EnableEvents been left 'False' by some process that
threw an error?

unless it would need to be in the "ThisWorkbook" since its a live
update thing?


Please explain! (You said/implied this was a cell dropdown containing
choices, which means a DV list!)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #5   Report Post  
Junior Member
 
Posts: 20
Default


ive tried _Change and _Calculate, neither has worked. they just wont
trigger for some reason.

Has Application.EnableEvents been left 'False' by some process that
threw an error?


I'm not sure, would I need to just declare this as true in the function to change it if it has been set to false?

unless it would need to be in the "ThisWorkbook" since its a live
update thing

Please explain! (You said/implied this was a cell dropdown containing
choices, which means a DV list!)?

I mean the actual code, does it need to be within the "ThisWorkbook" under The objects folder in the developer window?




--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion[/quote]


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Dropbox change Trigger an event

I mean the actual code, does it need to be within the "ThisWorkbook"
under The objects folder in the developer window?


Right click the sheet tab and select 'View code'. In the dropbox at the
top left of the code window select 'Worksheet'. In the dropbox at the
top right of the code window select 'Change'. In place of the MsgBox
code put the name of the procedure you want to run...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trigger Event on Format Change Zone[_3_] Excel Discussion (Misc queries) 4 August 25th 07 05:43 PM
Change Event on Dropbox Troubled User Excel Programming 1 September 11th 06 06:28 PM
Cell value change to trigger macro (worksheet change event?) Neil Goldwasser Excel Programming 4 January 10th 06 01:55 PM
Trigger an event on Checkbox change James Geniti Excel Programming 0 September 1st 04 09:24 PM
Trigger an event on Checkbox change James[_28_] Excel Programming 2 September 1st 04 08:31 PM


All times are GMT +1. The time now is 02:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"