Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Calling a Macro from module

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
peter.thompson - 21 Jan 2006 04:55 GMT
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)

Signature

peter.thompson

Norman Jones - 21 Jan 2006 09:14 GMT
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

> I have Public Sub Unlockbuttons() Macro recorded in a module.
>
[quoted text clipped - 10 lines]
>
> Peter (Working my way through first VBA project)
peter.thompson - 21 Jan 2006 23:14 GMT
Thanks Norman, much appreciated

Cheers

Peter

Signature

peter.thompson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.