Calling a Macro from module

P

peter.thompson

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)
 
N

Norman Jones

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top