ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calling macro from UserForm (https://www.excelbanter.com/excel-programming/352147-calling-macro-userform.html)

AMK4[_30_]

Calling macro from UserForm
 

I have a macro defined in a module. How can I call that macro from a
actionButton on a UserForm? Right now it's telling me "Sub or Functio
not defined.

--
AMK
-----------------------------------------------------------------------
AMK4's Profile: http://www.excelforum.com/member.php...fo&userid=1914
View this thread: http://www.excelforum.com/showthread.php?threadid=50754


JMB

Calling macro from UserForm
 
Are you using Call?

Call MacroName



"AMK4" wrote:


I have a macro defined in a module. How can I call that macro from an
actionButton on a UserForm? Right now it's telling me "Sub or Function
not defined."


--
AMK4
------------------------------------------------------------------------
AMK4's Profile: http://www.excelforum.com/member.php...o&userid=19143
View this thread: http://www.excelforum.com/showthread...hreadid=507544



AMK4[_31_]

Calling macro from UserForm
 

JMB Wrote:
Are you using Call?

Call MacroName



Yes I am. Does it make a difference if the macro being called is a
Private one (which it is)?


--
AMK4
------------------------------------------------------------------------
AMK4's Profile: http://www.excelforum.com/member.php...o&userid=19143
View this thread: http://www.excelforum.com/showthread...hreadid=507544


JMB

Calling macro from UserForm
 
Private Sub procedures are only available to other macros declared in the
same module.

"AMK4" wrote:


JMB Wrote:
Are you using Call?

Call MacroName



Yes I am. Does it make a difference if the macro being called is a
Private one (which it is)?


--
AMK4
------------------------------------------------------------------------
AMK4's Profile: http://www.excelforum.com/member.php...o&userid=19143
View this thread: http://www.excelforum.com/showthread...hreadid=507544




All times are GMT +1. The time now is 08:44 AM.

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