Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-21-2018, 03:41 PM
Cosmo Cosmo is offline Callback to function in a module Windows Vista Callback to function in a module Office 2007
Competent Performer
Callback to function in a module
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default Callback to function in a module

I have created a class to manage a series of UserForms to collect data, and in that class I have it passing a callback to each user form using "CallByName", which refers to a function in the class to open the next dialog. That seems to be working properly.

Now I need the control class to pass a callback to a function in the main Module (not a class) to process the data, but I can't use "CallByName" since that requires an object, not a module.

I think I may need to use AddressOf, but I'm not sure if I'm doing this correctly.

Can somebody help me to pass a function as a parameter from the module to the class, and to call that function from the class. In my control class, I want a function such as:
Code:
function setCallbackFunction (moduleFunctionToProcessData){
     ' Set a property in the class to hold reference to function in module
}
so that I can call it, with parameters and return value:
Code:
myResult = moduleFunctionToProcessData(arg1, arg2, arg3)
Thank you.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile error on hidden module Simss Excel Programming 2 09-25-2017 01:37 AM
Callback to function in a module Why are my Macros combined into a single module? Cyberseeker Excel Programming 1 04-02-2017 02:43 AM
Callback to function in a module Compile error in Module ksigcajun Word VBA 2 04-08-2015 06:44 AM
Inserting a Word Module into excel SarahBear Excel Programming 12 06-11-2014 05:26 AM
AZWizard Module - ?hidden module pcaldwell Word 1 08-22-2012 01:19 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft