ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Dropbox change Trigger an event (https://www.excelbanter.com/excel-discussion-misc-queries/450083-dropbox-change-trigger-event.html)

Pistolade

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

GS[_2_]

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



Pistolade

Quote:

Originally Posted by GS[_2_] (Post 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?

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?

GS[_2_]

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



Pistolade


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]

GS[_2_]

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




All times are GMT +1. The time now is 01:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com