VBA new function doesn't execute

  • Thread starter Thread starter palasick
  • Start date Start date
P

palasick

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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top