ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA new function doesn't execute (https://www.excelbanter.com/excel-programming/312108-vba-new-function-doesnt-execute.html)

palasick

VBA new function doesn't execute
 

Newbie here (I apologize in advance)... I have a spreadsheet wit
several functions tied to a button. I would like to add functionalit
(that someone wrote for me) where this new action will pick up wher
the other one left off. So I cut-and-paste this new function, but a
runtime the new function is ignored. Now, I notice that the function
that were there previously have a value of 'prg1' in the 'object
pulldown list, but the function I pasted in has gone into the {general
object. Now, I'm assuming I must somehow place this new function als
into the 'prg1' object, so that it will execute along with the othe
'prg1' functions. But can't seem to figure out how to do that. Or mayb
that's not what I need to do.... don't know. Ideas? Thanks. Mike

--
palasic
-----------------------------------------------------------------------
palasick's Profile: http://www.excelforum.com/member.php...fo&userid=1490
View this thread: http://www.excelforum.com/showthread.php?threadid=26532


Bob Kilmer

VBA new function doesn't execute
 
If the button begins execution of some code, and you want this new function
to execute at some point while the button code code is executing or after it
executes, the function must be called by the executing code.

Sub Button_Click
'do this
'do that
'call the new function
x = NewFunction()
'do somehting else perhaps or not depending
End Sub

It is not important that the function be moved from the General list. Unless
it is part of a class or form, General is where it will appear. The
functions that "have a value of 'prg1' in the 'object' pulldown list" are
events or properties of the object prg1.

"palasick" wrote in message
...

Newbie here (I apologize in advance)... I have a spreadsheet with
several functions tied to a button. I would like to add functionality
(that someone wrote for me) where this new action will pick up where
the other one left off. So I cut-and-paste this new function, but at
runtime the new function is ignored. Now, I notice that the functions
that were there previously have a value of 'prg1' in the 'object'
pulldown list, but the function I pasted in has gone into the {general}
object. Now, I'm assuming I must somehow place this new function also
into the 'prg1' object, so that it will execute along with the other
'prg1' functions. But can't seem to figure out how to do that. Or maybe
that's not what I need to do.... don't know. Ideas? Thanks. Mike.


--
palasick
------------------------------------------------------------------------
palasick's Profile:

http://www.excelforum.com/member.php...o&userid=14903
View this thread: http://www.excelforum.com/showthread...hreadid=265325





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

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