Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default 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



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
how to execute the fill function down a long column Harvey Excel Discussion (Misc queries) 5 September 4th 09 08:30 PM
How do I get a function to execute on a specific date in Excel? mfarino Excel Worksheet Functions 1 March 3rd 09 10:22 AM
can I execute and 'substring' function in Excel Larry Excel Worksheet Functions 4 January 1st 06 08:16 PM
How do i execute a VBA function by clicking on an excel cell? Matthew Excel Discussion (Misc queries) 1 December 7th 05 01:10 AM
Could not execute Gary Excel Worksheet Functions 1 December 20th 04 06:20 PM


All times are GMT +1. The time now is 09:45 AM.

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"