Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calling a Macro from module


I have Public Sub Unlockbuttons() Macro recorded in a module.

How do I execute this macro from within code in a userform. I'm using
this code:

If Sheet6.Range("f49") = 0 And Sheet6.Range("f59").Text =
Sheet6.Range("f50").Text Then

'Here is where I need the code to execute the Unlockbuttons macro

Would appreciate any guideance
Cheers

Peter (Working my way through first VBA project)


--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile: http://www.excelforum.com/member.php...o&userid=29686
View this thread: http://www.excelforum.com/showthread...hreadid=503579

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Calling a Macro from module

Hi Peter,

Try:

With Sheets("Sheet6")
If .Range("F49").Value = 0 _
And .Range("F59").Value = .Range("F50").Value Then
Call UnlockButtons
End If
End With

---
Regards,
Norman



"peter.thompson"
<peter.thompson.21yxly_1137819601.3662@excelforu m-nospam.com wrote in
message news:peter.thompson.21yxly_1137819601.3662@excelfo rum-nospam.com...

I have Public Sub Unlockbuttons() Macro recorded in a module.

How do I execute this macro from within code in a userform. I'm using
this code:

If Sheet6.Range("f49") = 0 And Sheet6.Range("f59").Text =
Sheet6.Range("f50").Text Then

'Here is where I need the code to execute the Unlockbuttons macro

Would appreciate any guideance
Cheers

Peter (Working my way through first VBA project)


--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile:
http://www.excelforum.com/member.php...o&userid=29686
View this thread: http://www.excelforum.com/showthread...hreadid=503579



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calling a Macro from module


Thanks Norman, much appreciated

Cheers

Peter


--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile: http://www.excelforum.com/member.php...o&userid=29686
View this thread: http://www.excelforum.com/showthread...hreadid=503579

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
calling a module [email protected] Excel Discussion (Misc queries) 1 September 28th 07 04:03 PM
Calling worksheet module from other module. Michael Malinsky Excel Programming 2 December 14th 05 08:47 PM
Calling an Excel/VBA User Created Module from WSH None Excel Programming 3 April 14th 05 01:03 AM
Calling Worksheet SubProcs From Module Chris Villanueva Excel Programming 3 May 29th 04 02:53 AM
Calling VBA function that is in another module Jag Man Excel Programming 2 January 7th 04 03:37 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"